SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::Net::Socket Class Reference

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.
 
Socketoperator= (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.
 

Detailed Description

This class is Wrapper of socket.

Definition at line 17 of file Socket.h.


The documentation for this class was generated from the following files: