tamer::fdx Namespace Reference

Namespace containing extensions to Tamer's file descriptor support, such as helper functions for creating TCP connections. More...


Functions

void tcp_listen (int port, int backlog, event< fd > result)
 Open a nonblocking TCP connection on port port.
void tcp_listen (int port, event< fd > result)
 Open a nonblocking TCP connection on port port.
void tcp_connect (struct in_addr addr, int port, event< fd > result)
 Create a nonblocking TCP connection to addr:port.


Detailed Description

Namespace containing extensions to Tamer's file descriptor support, such as helper functions for creating TCP connections.

Function Documentation

void tamer::fdx::tcp_listen ( int  port,
int  backlog,
event< fd >  result 
)

Open a nonblocking TCP connection on port port.

Parameters:
port Listening port (in host byte order).
backlog Maximum connection backlog.
result Event triggered on completion.
Returns the new listening file descriptor via the result event. The returned file descriptor is made nonblocking, and is opened with the SO_REUSEADDR option. To check whether the function succeeded, use valid() or error() on the resulting file descriptor.

void tamer::fdx::tcp_listen ( int  port,
event< fd >  result 
) [inline]

Open a nonblocking TCP connection on port port.

Parameters:
port Listening port (in host byte order).
result Event triggered on completion.
Equivalent to tcp_listen(port, fd::default_backlog, result).

void tamer::fdx::tcp_connect ( struct in_addr  addr,
int  port,
event< fd >  result 
)

Create a nonblocking TCP connection to addr:port.

Parameters:
addr Remote host.
port Remote port (in host byte order).
result Event triggered on completion.
Returns the connected file descriptor via the result event. The returned file descriptor is made nonblocking. To check whether the connect attempt succeeded, use valid() or error() on the resulting file descriptor.


Generated on Wed Aug 22 17:55:29 2007 for Tamer by  doxygen 1.5.1