RType
Public Member Functions | List of all members
USocket Class Referenceabstract

#include <USocket.hpp>

Inheritance diagram for USocket:
Inheritance graph
[legend]

Public Member Functions

virtual ~USocket ()=default
 Destructor of USocket. More...
 
virtual void send (Packet *packet, struct sockaddr_in dest)=0
 Send a packet to a client. More...
 
virtual std::tuple< std::unique_ptr< Packet >, int > receive ()=0
 Receive a packet from a client. More...
 
virtual void splitAndSend (Packet *packet, struct sockaddr_in dest)=0
 Send a split packet to a client. More...
 
virtual void run ()=0
 Run the server socket. More...
 
virtual void sendPacket (SplitPacket *packet, struct sockaddr_in dest)=0
 Send a split packet to a client. More...
 

Detailed Description

Definition at line 151 of file USocket.hpp.

Constructor & Destructor Documentation

◆ ~USocket()

virtual USocket::~USocket ( )
virtualdefault

Destructor of USocket.

Member Function Documentation

◆ receive()

virtual std::tuple<std::unique_ptr<Packet>, int> USocket::receive ( )
pure virtual

Receive a packet from a client.

Returns
a tuple with the packet and the size of the packet

Implemented in ServerSocket, and ClientSocket.

◆ run()

virtual void USocket::run ( )
pure virtual

Run the server socket.

Implemented in ServerSocket, and ClientSocket.

◆ send()

virtual void USocket::send ( Packet packet,
struct sockaddr_in  dest 
)
pure virtual

Send a packet to a client.

Parameters
packet
dest

Implemented in ServerSocket, and ClientSocket.

◆ sendPacket()

virtual void USocket::sendPacket ( SplitPacket packet,
struct sockaddr_in  dest 
)
pure virtual

Send a split packet to a client.

Parameters
packet
dest

Implemented in ServerSocket, and ClientSocket.

◆ splitAndSend()

virtual void USocket::splitAndSend ( Packet packet,
struct sockaddr_in  dest 
)
pure virtual

Send a split packet to a client.

Parameters
packet
dest

Implemented in ServerSocket, and ClientSocket.


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