#include <tcpsocket.h>


Public Member Functions | |
| TcpSocket (int af) | |
| Socket * | accept () |
| int | setListen (int backlog=10) |
| bool | isListen () |
Definition at line 14 of file tcpsocket.h.
| Socket * n2nc::net::TcpSocket::accept | ( | ) |
Accept a new incoming connection,
cleanest way. i should fit sockaddr directly by getRawSockAddr() but i prefer a local copy and use constructor
this address can be gathered from getpeername()
FIXME all in this context: check for EAGAIN
Definition at line 22 of file tcpsocket.cpp.
References n2nc::net::Socket::m_af, n2nc::net::Socket::m_fd, m_islisten, and n2nc::net::Socket::m_type.
| int n2nc::net::TcpSocket::setListen | ( | int | backlog = 10 |
) |
Associate a socketaddress to this socket Sets this socket as listenig socket. Once used this socket become connection-oriented socket
Definition at line 10 of file tcpsocket.cpp.
References n2nc::net::Socket::m_fd, and n2nc::net::Socket::setSockOpt().
Referenced by n2nc::Server::listen().


1.5.5