This class is Wrapper of socket. More...
#include <Socket.h>
Public Member Functions | |
| Socket ()=default | |
| Constructor Function. | |
| Socket (SOCKET socketFd) | |
| Constructor Function. | |
| virtual | ~Socket () |
| Destructor Function. | |
| Socket (const Socket &)=delete | |
| Copy Constructor Function. | |
| Socket & | operator= (const Socket &)=delete |
| Copy Assignment Operation. | |
| void | Create () |
| Create Non Blocking Socket. | |
| const SOCKET | Fd () const |
| Get this socket fd. | |
| SOCKET | Fd () |
| Get this socket fd. | |
| void | BindAddress (const InetAddress &localAddress) const |
| Bind address to socket. | |
| void | Listen () const |
| Listen on socket. | |
| void | Connect (InetAddress *connectAddress) const |
| Connect to socket. | |
| SOCKET | Accept (InetAddress *peerAddress) const |
| Accept connection on socket. | |
| void | Send (const std::string &data) const |
| Send data to server. | |
| std::string | Receive () const |
| Receive data from server. | |
| void | ShutDownWrite () const |
| Disable writen in socket. | |
| void | SetTcpNoDelay (bool on) const |
| Set socket Tcp no delay option. | |
| void | SetReuseAddress (bool on) const |
| Set socket reuse address option. | |
| void | SetReusePort (bool on) const |
| Set socket reuse port option. | |
| void | SetKeepAlive (bool on) const |
| Set socket keep alive option. | |
Private Attributes | |
| SOCKET | m_SocketFd |
| This socket fd. | |