- Timestamp:
- Jul 25, 2006, 5:14:53 PM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/tcp_server_socket.cc
r9459 r9460 126 126 } 127 127 128 129 NetworkSocket* TcpServerSocket::getNewProxySocket( ) 130 { 131 return NULL; 132 } 133 134 128 135 void TcpServerSocket::close( ) 129 136 { -
branches/proxy/src/lib/network/tcp_server_socket.h
r9459 r9460 26 26 virtual bool listen( unsigned int port ); 27 27 virtual NetworkSocket* getNewClientSocket( void ); 28 virtual NetworkSocket* getNewProxySocket( void ); 28 29 virtual void close(); 29 30 virtual void update() {}; -
branches/proxy/src/lib/network/udp_server_socket.cc
r9459 r9460 77 77 78 78 /** 79 * get newly connected socket. note79 * get newly connected client socket. note 80 80 * @return new socket or NULL if no new socket exists 81 * 82 * only clients connect to this socket 81 83 */ 82 84 NetworkSocket * UdpServerSocket::getNewClientSocket( void ) … … 93 95 return result; 94 96 } 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 */ 105 NetworkSocket * 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 95 120 96 121 /** … … 220 245 if ( !socket ) 221 246 return false; 222 247 223 248 assert( networkPacket.length <= UDP_PACKET_SIZE ); 224 249 … … 232 257 return false; 233 258 } 234 259 235 260 return true; 236 261 } … … 250 275 251 276 if ( packet->len <= 0 ) 252 continue; 253 277 continue; 278 254 279 for ( userId =0; userId < (int)userList.size(); userId++ ) 255 280 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 52 52 53 53 virtual NetworkSocket* getNewClientSocket( void ); 54 virtual NetworkSocket* getNewProxySocket( void ); 54 55 55 56 virtual void close();
Note: See TracChangeset
for help on using the changeset viewer.