API New Year  1.0
API for the project ZIA, EPITECH 2017.
ApiNewYear::ISocket Class Referenceabstract

Base class representing minimum information needed for sockets. More...

#include <ISocket.h>

Collaboration diagram for ApiNewYear::ISocket:
Collaboration graph

Public Member Functions

virtual SOCKET getSocket (void) const =0
 Base class representing minimum information needed for sockets. More...
 
virtual void setSocket (SOCKET sd)=0
 Setter for socket. More...
 
virtual const std::string & getIp (void) const =0
 Getter for IP address. More...
 
virtual const std::string & getHost (void) const =0
 Getter for Hostname. More...
 
virtual int getPort (void) const =0
 Getter for Port number. More...
 
virtual const struct sockaddr * getSockInfo () const =0
 Getter for sockaddr used by the socket. More...
 
virtual void setSockInfo (struct sockaddr *)=0
 Setter for sockaddr used by the socket. More...
 

Detailed Description

Base class representing minimum information needed for sockets.

Establishes the base architecture for Sockets used by the server.

Member Function Documentation

virtual const std::string& ApiNewYear::ISocket::getHost ( void  ) const
pure virtual

Getter for Hostname.

ISocket get Hostname of the corresponding client.

Returns
cosntant string reference containing the Hostname.
virtual const std::string& ApiNewYear::ISocket::getIp ( void  ) const
pure virtual

Getter for IP address.

ISocket get IP address of client using socket.

Returns
a constant string reference containing the IP address.
virtual int ApiNewYear::ISocket::getPort ( void  ) const
pure virtual

Getter for Port number.

ISocket get Port number used by socket.

Returns
int representing the port number.
virtual SOCKET ApiNewYear::ISocket::getSocket ( void  ) const
pure virtual

Base class representing minimum information needed for sockets.

Establishes the base architecture for Sockets used by the server.

virtual const struct sockaddr* ApiNewYear::ISocket::getSockInfo ( ) const
pure virtual

Getter for sockaddr used by the socket.

ISocket get the sockaddr used by the socket

Returns
const pointer to the sockaddr
virtual void ApiNewYear::ISocket::setSocket ( SOCKET  sd)
pure virtual

Setter for socket.

ISocket sets the socket/

Parameters
sdthe socket
virtual void ApiNewYear::ISocket::setSockInfo ( struct sockaddr *  )
pure virtual

Setter for sockaddr used by the socket.

ISocket set the sockaddr used by the socket.

Parameters
sockaddrpointer to the sockaddr

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