Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

working on proxy server connection acception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 ) )
Note: See TracChangeset for help on using the changeset viewer.