TCP client socket.
|
|
| TcpSocket () |
| | Default Constructor.
|
| |
|
| TcpSocket (System::EventLoop &loop) |
| | Construct with event loop.
|
| |
|
| TcpSocket (TcpServer &server) |
| | Accepts a connection.
|
| |
| | TcpSocket (const Endpoint &ep) |
| | Connects to a host. More...
|
| |
|
| ~TcpSocket () |
| | Destructor.
|
| |
|
void | accept (TcpServer &server) |
| | Accepts a connection.
|
| |
|
void | accept (TcpServer &server, const TcpSocketOptions &o) |
| | Accepts a connection.
|
| |
| void | beginConnect (const Endpoint &ep) |
| | Begin connecting to a host. More...
|
| |
| void | beginConnect (const Endpoint &ep, const TcpSocketOptions &o) |
| | Begin connecting to a host. More...
|
| |
|
void | beginRead (char *buffer, std::size_t n) |
| | Begins to read data.
|
| |
|
void | beginWrite (const char *buffer, std::size_t n) |
| | Begins to write data.
|
| |
|
void | cancel () |
| | Cancels all operations.
|
| |
|
void | close () |
| | Closes the device.
|
| |
| void | connect (const Endpoint &ep) |
| | Connect to a host. More...
|
| |
| void | connect (const Endpoint &ep, const TcpSocketOptions &o) |
| | Connect to a host. More...
|
| |
| Signal< TcpSocket & > & | connected () |
| | Notifies that the socket was connected. More...
|
| |
|
void | detach () |
| | Remove from event loop and cancels outstanding operations.
|
| |
| void | endConnect () |
| | Ends connecting to a host. More...
|
| |
|
std::size_t | endRead () |
| | Ends reading data.
|
| |
|
std::size_t | endWrite () |
| | Ends writing data.
|
| |
| Signal< IODevice & > & | inputReady () |
| | Notifies about available data. More...
|
| |
|
bool | isConnected () const |
| | Returns true if connected.
|
| |
|
bool | isEof () const |
| | Returns if the device has reached EOF.
|
| |
|
bool | isReading () const |
| | Returns true if the device is reading.
|
| |
|
bool | isWriting () const |
| | Returns true if the device is writing.
|
| |
|
void | localEndpoint (Endpoint &ep) const |
| | Gets the local endpoint.
|
| |
|
EventLoop * | loop () const |
| | Returns the used event loop.
|
| |
| Signal< IODevice & > & | outputReady () |
| | Notifies when data can be written. More...
|
| |
| std::size_t | peek (char *buffer, std::size_t n) |
| | Peek data from I/O device without consuming them. More...
|
| |
| pos_type | position () |
| | Returns the current I/O position. More...
|
| |
| std::size_t | read (char *buffer, std::size_t n) |
| | Read data from I/O device. More...
|
| |
|
void | remoteEndpoint (Endpoint &ep) const |
| | Gets the remote endpoint.
|
| |
|
bool | run () |
| | Run operation if it is ready.
|
| |
| pos_type | seek (off_type offset, seekdir sd) |
| | Moves the read position to the given offset. More...
|
| |
|
bool | seekable () const |
| | Returns true if device is seekable.
|
| |
|
void | setActive (EventLoop &parent) |
| | Sets the parent loop, so that operations can be run.
|
| |
|
void | setTimeout (std::size_t timeout) |
| | Sets the timeout for blocking I/O in milliseconds.
|
| |
| void | sync () |
| | Synchronize device. More...
|
| |
| std::size_t | write (const char *buffer, std::size_t n) |
| | Write data to I/O device. More...
|
| |