Zappy - Year end project 2
This is a project that Epitech asked us to create in order to allow us to reveiw the notions of the current year.
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions
tcp_server.TCPServer Class Reference
Collaboration diagram for tcp_server.TCPServer:
Collaboration graph

Public Member Functions

None __init__ (self, GlobalVariables global_variables)
 
int run (self)
 

Data Fields

 global_variables
 
 current_query
 
 logistics
 

Protected Member Functions

None _process_incoming (self, socket tcp_socket)
 
bool _send_output_data (self, socket tcp_socket)
 
None _initialise_logistics (self)
 
int _mainloop (self, socket tcp_socket)
 
int _start_tcp_socket (self)
 

Detailed Description

_summary_
This is the class in charge of creating a tcp server and connecting to the server binary
Args:
    Thread (_type_): _description_

Definition at line 16 of file tcp_server.py.

Constructor & Destructor Documentation

◆ __init__()

None tcp_server.TCPServer.__init__ ( self,
GlobalVariables global_variables )

Definition at line 23 of file tcp_server.py.

Member Function Documentation

◆ _initialise_logistics()

None tcp_server.TCPServer._initialise_logistics ( self)
protected
_summary_
This is the function in charge fo 
Returns:
    int: _description_

Definition at line 84 of file tcp_server.py.

◆ _mainloop()

int tcp_server.TCPServer._mainloop ( self,
socket tcp_socket )
protected
_summary_
The server loop that is in charge of managing the packets

Returns:
    int: _description_

Definition at line 94 of file tcp_server.py.

◆ _process_incoming()

None tcp_server.TCPServer._process_incoming ( self,
socket tcp_socket )
protected
_summary_
    Process incoming data from the server binary
Args:
    tcp_socket (socket): _description_: The tcp connection

Definition at line 28 of file tcp_server.py.

◆ _send_output_data()

bool tcp_server.TCPServer._send_output_data ( self,
socket tcp_socket )
protected
_summary_
    Send any data that could of been generated by the program
Args:
    tcp_socket (socket): _description_: The tcp connection

Returns:
    bool: _description_: if ab error occurred: False, else True

Definition at line 51 of file tcp_server.py.

◆ _start_tcp_socket()

int tcp_server.TCPServer._start_tcp_socket ( self)
protected
_summary_
This is the function that will lay the foundation for the tcp server.

Returns:
    int: _description_

Definition at line 110 of file tcp_server.py.

◆ run()

int tcp_server.TCPServer.run ( self)
_summary_
This is the function in charge of starting any function that contains the code we wish to run inside the thread we started.

Definition at line 136 of file tcp_server.py.

Field Documentation

◆ current_query

tcp_server.TCPServer.current_query

Definition at line 26 of file tcp_server.py.

◆ global_variables

tcp_server.TCPServer.global_variables

Definition at line 24 of file tcp_server.py.

◆ logistics

tcp_server.TCPServer.logistics

Definition at line 91 of file tcp_server.py.


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