Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9460 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 25, 2006, 5:14:53 PM (18 years ago)
Author:
patrick
Message:

working on proxy server connection acception

Location:
branches/proxy/src/lib/network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/tcp_server_socket.cc

    r9459 r9460  
    126126}
    127127
     128
     129NetworkSocket* TcpServerSocket::getNewProxySocket( )
     130{
     131    return NULL;
     132}
     133
     134
    128135void TcpServerSocket::close( )
    129136{
  • branches/proxy/src/lib/network/tcp_server_socket.h

    r9459 r9460  
    2626    virtual bool listen( unsigned int port );
    2727    virtual NetworkSocket* getNewClientSocket( void );
     28    virtual NetworkSocket* getNewProxySocket( void );
    2829    virtual void close();
    2930    virtual void update() {};
  • branches/proxy/src/lib/network/udp_server_socket.cc

    r9459 r9460  
    7777
    7878/**
    79  * get newly connected socket. note
     79 * get newly connected client socket. note
    8080 * @return new socket or NULL if no new socket exists
     81 *
     82 *  only clients connect to this socket
    8183 */
    8284NetworkSocket * UdpServerSocket::getNewClientSocket( void )
     
    9395  return result;
    9496}
     97
     98
     99/**
     100 * get newly connected proxy socket. note
     101 * @return new socket or NULL if no new socket exists
     102 *
     103 * only proxy servers connect to this socket
     104 */
     105NetworkSocket * UdpServerSocket::getNewProxySocket( void )
     106{
     107  NetworkSocket * result = NULL;
     108
     109  if ( newSocketList.size() > 0 )
     110  {
     111    result = newSocketList.front();
     112
     113    newSocketList.pop_front();
     114  }
     115
     116  return result;
     117}
     118
     119
    95120
    96121/**
     
    220245  if ( !socket )
    221246    return false;
    222  
     247
    223248  assert( networkPacket.length <= UDP_PACKET_SIZE );
    224249
     
    232257    return false;
    233258  }
    234  
     259
    235260  return true;
    236261}
     
    250275
    251276    if ( packet->len <= 0 )
    252       continue; 
    253        
     277      continue;
     278
    254279    for ( userId =0; userId < (int)userList.size(); userId++ )
    255280      if ( userList[userId].addr.host == packet->address.host && userList[userId].addr.port == packet->address.port && userList[userId].randomByte == ( packet->data[0] & 0xFC ) )
  • branches/proxy/src/lib/network/udp_server_socket.h

    r9459 r9460  
    5252
    5353    virtual NetworkSocket* getNewClientSocket( void );
     54    virtual NetworkSocket* getNewProxySocket( void );
    5455
    5556    virtual void close();
Note: See TracChangeset for help on using the changeset viewer.