================= SV_ConnectionlessPacket A connectionless packet has four leading 0xff characters to distinguish it from a game channel. Clients that are in the game can still send connectionless packets. ================= */
| 259 | ================= |
| 260 | */ |
| 261 | static void SV_ConnectionlessPacket( netadr_t from, msg_t *msg ) { |
| 262 | char *s; |
| 263 | const char *c; |
| 264 | |
| 265 | MSG_BeginReading( msg ); |
| 266 | MSG_ReadLong( msg ); // skip the -1 marker |
| 267 | |
| 268 | s = MSG_ReadStringLine( msg ); |
| 269 | |
| 270 | Cmd_TokenizeString( s ); |
| 271 | |
| 272 | c = Cmd_Argv(0); |
| 273 | Com_DPrintf ("SV packet %s : %s\n", NET_AdrToString(from), c); |
| 274 | |
| 275 | if (!strcmp(c,"getstatus")) { |
| 276 | SVC_Status( from ); |
| 277 | } else if (!strcmp(c,"getinfo")) { |
| 278 | SVC_Info( from ); |
| 279 | } else if (!strcmp(c,"connect")) { |
| 280 | SV_DirectConnect( from ); |
| 281 | } else if (!strcmp(c,"disconnect")) { |
| 282 | // if a client starts up a local server, we may see some spurious |
| 283 | // server disconnect messages when their new server sees our final |
| 284 | // sequenced messages to the old client |
| 285 | } else { |
| 286 | Com_DPrintf ("bad connectionless packet from %s:\n%s\n" |
| 287 | , NET_AdrToString (from), s); |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | |
| 292 | //============================================================================ |
no test coverage detected