Menu

[r712]: / framework2 / trunk / cppcms / aio / socket.h  Maximize  Restore  History

Download this file

33 lines (23 with data), 562 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef CPPCMS_AIO_SOCKET_H
#define CPPCMS_AIO_SOCKET_H
#include <cppcms/util/noncopyable.h>
namespace cppcms {
namespace aio {
struct tcp {};
struct unix {};
struct udp {};
class endpoint;
class socket : public util::noncopyable {
public:
socket();
~socket();
void async_connect(endpoint const &,error_handler);
void async_read_some(void *buffer,size_t s,io_handler);
void async_write_some(void *buffer,size_t s,io_handler);
void close();
private:
std::auto_ptr<socket_impl> p;
};
} // aio
} // cppcms
#endif
MongoDB Logo MongoDB