Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5732 in orxonox.OLD for branches/network/src/lib


Ignore:
Timestamp:
Nov 23, 2005, 2:59:11 PM (19 years ago)
Author:
rennerc
Message:

network_socket: added constructor which connects directly

Location:
branches/network/src/lib/network
Files:
2 edited

Legend:

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

    r5729 r5732  
    5858  PRINTF(0)("NetworkSocket created\n");
    5959
     60}
     61
     62/**
     63 * Constructor to connect directly
     64 */
     65NetworkSocket::NetworkSocket(char * ipAddress, unsigned int port)
     66{
     67  NetworkSocket();
     68  IPaddress ip;
     69  SDLNet_ResolveHost(&ip, ipAddress, port);
     70  connectToServer(ip, port);
    6071}
    6172
  • branches/network/src/lib/network/network_socket.h

    r5729 r5732  
    2424#ifdef HAVE_SDL_H
    2525#include <SDL_Thread.h>
    26 #else 
     26#else
    2727#include <SDL/SDL_thread.h>
    2828#endif
     
    7373
    7474  NetworkSocket();
     75  NetworkSocket(char * ipAddress, unsigned int port);
    7576  ~NetworkSocket();
    7677
Note: See TracChangeset for help on using the changeset viewer.