Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5577 in orxonox.OLD for branches/network


Ignore:
Timestamp:
Nov 16, 2005, 12:47:16 AM (19 years ago)
Author:
hdavid
Message:

small update in network_socket.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_socket.cc

    r5565 r5577  
    6262void NetworkSocket::connectToServer(IPaddress ip, unsigned int port)
    6363{
     64
     65        /* Connect to the host and port contained in ip using a TCP connection. */
     66        tcpSocket = SDLNet_TCP_Open(&ip);
     67        if(!tcpSocket)
     68        {
     69    PRINTF(1)("SDLNet_TCP_Open: %s\n", SDLNet_GetError());
     70    return;
     71        }
     72
    6473}
    6574
     
    7786void NetworkSocket::disconnectServer( )
    7887{
     88
     89        /* Close the connection */
     90        SDLNet_TCP_Close(tcpSocket);
     91
    7992}
    8093
Note: See TracChangeset for help on using the changeset viewer.