Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7954 in orxonox.OLD for trunk/src/lib/network/server_socket.h


Ignore:
Timestamp:
May 29, 2006, 3:28:41 PM (18 years ago)
Author:
patrick
Message:

trunk: merged the network branche back to trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/server_socket.h

    r6981 r7954  
    88#define _SERVER_SOCKET
    99
    10 #ifdef HAVE_SDL_H
    11 #include <SDL_thread.h>
    12 #else
    13 #include <SDL/SDL_thread.h>
    14 #endif
    1510/* include this file, it contains some default definitions */
    1611#include "netdefs.h"
     
    2116#include "network_socket.h"
    2217
    23 //sleep when waiting for connections
    24 #define _MSECONDS_SLEEP_LISTEN 100
    2518
    2619class ServerSocket : public BaseObject
    2720{
    28   private:
    29     TCPsocket listenSocket;
    30     bool terminateThread;
     21  public:
     22    ServerSocket( int port);
    3123
    32     bool _isListening;
     24    virtual ~ServerSocket();
    3325
    34     void init();
     26    virtual bool listen( unsigned int port ) = 0;
     27    virtual NetworkSocket* getNewSocket( void ) = 0;
     28    virtual void close() = 0;
     29    virtual void update() = 0;
     30    virtual bool isOk() { return this->bOk; };
    3531
    36   public:
    37     ServerSocket();
    38     ServerSocket( unsigned int port );
    39     virtual ~ServerSocket();
    40     bool listen( unsigned int port );
    41     NetworkSocket* getNewSocket( void );
    42     void close();
    43     inline bool isOk(){ return listenSocket!=NULL; }
     32  protected:
     33    bool bOk;
     34
    4435};
    4536
Note: See TracChangeset for help on using the changeset viewer.