|
The Micro C++ Library
|
A ClientSocket represents a Transmission Control Protocol (TCP) client endpoint of a StreamSocket. More...
#include <micxx.hxx>
Inherits micxx::StreamSocket.
Inherited by micxx::SSLClientSocket.
Public Member Functions | |
| ClientSocket () | |
| Create a new unbound, disconnected ClientSocket. | |
| virtual void | connect (const SocketAddress &socketAddress) |
| Connect this socket to a server endpoint at the specified SocketAddress socketAddress. | |
Protected Member Functions | |
| ClientSocket (socket_t rawSocket, SocketAddress *socketAddress) | |
| Create a ClientSocket to an already connected rawSocket socket descriptor bound to the specified socketAddress. | |
Friends | |
| class | ServerSocket |
A ClientSocket represents a Transmission Control Protocol (TCP) client endpoint of a StreamSocket.
Example:
micxx::InetAddress inetAddress("127.0.0.1", 8000); micxx::ClientSocket socket; socket.connect(inetAddress); ... socket.send(...); socket.recv(...); ... socket.close();
| micxx::ClientSocket::ClientSocket | ( | ) |
Create a new unbound, disconnected ClientSocket.
| micxx::ClientSocket::ClientSocket | ( | socket_t | rawSocket, |
| SocketAddress * | socketAddress | ||
| ) | [protected] |
Create a ClientSocket to an already connected rawSocket socket descriptor bound to the specified socketAddress.
| rawSocket | the socket descriptor |
| socketAddress | the socket address to be used internally. This socket takes ownership of the allocated SocketAdress and gets responsible for deleting it |
| virtual void micxx::ClientSocket::connect | ( | const SocketAddress & | socketAddress | ) | [virtual] |
Connect this socket to a server endpoint at the specified SocketAddress socketAddress.
Reimplemented in micxx::SSLClientSocket.
friend class ServerSocket [friend] |