4 #ifndef _libiqnet_socket_h_
5 #define _libiqnet_socket_h_
16 typedef SOCKET Handler;
33 Handler get_handler()
const {
return sock; }
39 void set_non_blocking(
bool );
42 virtual size_t send(
const char*,
size_t );
43 virtual void send_shutdown(
const char*,
size_t );
45 virtual size_t recv(
char*,
size_t );
47 void bind(
const Inet_addr& addr );
48 void listen(
unsigned backlog = 5 );
53 Inet_addr get_addr()
const;
Object-oriented networking/multithreading infrastructure.
Definition: acceptor.h:11
An object representation of internet address.
Definition: inet_addr.h:27
virtual ~Socket()
Destructor. Does not close actual socket.
Definition: socket.h:31
const Inet_addr & get_peer_addr() const
Returns peer addr of connected or accepted socket.
Definition: socket.h:56
Relatively portable socket class.
Definition: socket.h:13