TCP listen socket. More...
#include <CTCPListenSocket.h>
Inherits IListenSocket.
Public Member Functions | |
virtual void | bind (const CNetworkAddress &) |
Bind socket to address. | |
virtual void | close () |
Close socket. | |
virtual void * | getEventTarget () const |
Get event target. | |
virtual IDataSocket * | accept () |
Accept connection. |
TCP listen socket.
A listen socket using TCP.
Definition at line 28 of file CTCPListenSocket.h.
IDataSocket * CTCPListenSocket::accept | ( | ) | [virtual] |
Accept connection.
Accept a connection, returning a socket representing the full-duplex data stream. Returns NULL if no socket is waiting to be accepted. This is only valid after a call to bind()
.
Implements IListenSocket.
Definition at line 102 of file CTCPListenSocket.cpp.
void CTCPListenSocket::bind | ( | const CNetworkAddress & | ) | [virtual] |
Bind socket to address.
Binds the socket to a particular address.
Implements IListenSocket.
Definition at line 58 of file CTCPListenSocket.cpp.
References CNetworkAddress::getAddress().
void CTCPListenSocket::close | ( | ) | [virtual] |
Close socket.
Closes the socket. This should flush the output stream.
Implements IListenSocket.
Definition at line 79 of file CTCPListenSocket.cpp.
void * CTCPListenSocket::getEventTarget | ( | ) | const [virtual] |
Get event target.
Returns the event target for events generated by this socket.
Implements IListenSocket.
Definition at line 96 of file CTCPListenSocket.cpp.