Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 27, 2006, 5:06:47 PM (18 years ago)
Author:
patrick
Message:

network: server socket adapted

File:
1 edited

Legend:

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

    r6981 r7402  
    2424#define _MSECONDS_SLEEP_LISTEN 100
    2525
     26
    2627class ServerSocket : public BaseObject
    2728{
    28   private:
    29     TCPsocket listenSocket;
    30     bool terminateThread;
     29  public:
     30#warning old socket structure
     31    ServerSocket();
     32    ServerSocket(unsigned int port);
    3133
    32     bool _isListening;
     34    ServerSocket(ConnectionType connectionType);
     35    ServerSocket(ConnectionType connectionType, unsigned int port );
     36    virtual ~ServerSocket();
    3337
    34     void init();
    35 
    36   public:
    37     ServerSocket();
    38     ServerSocket( unsigned int port );
    39     virtual ~ServerSocket();
    4038    bool listen( unsigned int port );
    4139    NetworkSocket* getNewSocket( void );
    4240    void close();
    4341    inline bool isOk(){ return listenSocket!=NULL; }
     42
     43
     44  private:
     45    void init();
     46
     47
     48  private:
     49#warning old socket structure
     50    TCPsocket         listenSocket;
     51
     52    ConnectionType    connectionType;                        //!< the connection type of the socket {TCP,UDP}
     53    TCPsocket         listenSocketTCP;                       //!< tcp socket
     54    UDPsocket         listenSocketUDP;                       //!< udp socket
     55    bool              terminateThread;                       //!< true if thread terminated
     56
     57    bool              _isListening;                          //!< true if listening
     58
     59
    4460};
    4561
Note: See TracChangeset for help on using the changeset viewer.