src/network/core/tcp.cpp
changeset 5864 a95a2849b0e1
parent 5624 6afe9d27430a
child 5898 4c682e9a58cc
equal deleted inserted replaced
5863:f328cb63dab3 5864:a95a2849b0e1
    13 #include "packet.h"
    13 #include "packet.h"
    14 #include "tcp.h"
    14 #include "tcp.h"
    15 #include "../../helpers.hpp"
    15 #include "../../helpers.hpp"
    16 
    16 
    17 /**
    17 /**
    18  * @file tcp.c Basic functions to receive and send TCP packets.
    18  * @file tcp.cpp Basic functions to receive and send TCP packets.
    19  */
    19  */
    20 
    20 
    21 /** Very ugly temporary hack !!! */
    21 /** Very ugly temporary hack !!! */
    22 void NetworkTCPSocketHandler::Initialize()
    22 void NetworkTCPSocketHandler::Initialize()
    23 {
    23 {
    41 /**
    41 /**
    42  * Functions to help NetworkRecv_Packet/NetworkSend_Packet a bit
    42  * Functions to help NetworkRecv_Packet/NetworkSend_Packet a bit
    43  *  A socket can make errors. When that happens this handles what to do.
    43  *  A socket can make errors. When that happens this handles what to do.
    44  * For clients: close connection and drop back to main-menu
    44  * For clients: close connection and drop back to main-menu
    45  * For servers: close connection and that is it
    45  * For servers: close connection and that is it
    46  * @param cs the client to close the connection of
       
    47  * @return the new status
    46  * @return the new status
    48  * TODO: needs to be splitted when using client and server socket packets
    47  * TODO: needs to be splitted when using client and server socket packets
    49  */
    48  */
    50 NetworkRecvStatus NetworkTCPSocketHandler::CloseConnection()
    49 NetworkRecvStatus NetworkTCPSocketHandler::CloseConnection()
    51 {
    50 {