MCPcopy Create free account
hub / github.com/TASEmulators/fceux / SendToAll

Function SendToAll

fceux-server/server.cpp:480–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480static void SendToAll(GameEntry *game, int cmd, uint8 *data, uint32 len) throw()
481{
482 uint8 poo[5];
483 int x;
484
485 poo[4] = cmd;
486
487 for(x=0;x<game->MaxPlayers;x++)
488 {
489 if(!game->Players[x] || !game->IsUnique[x]) continue;
490
491 try
492 {
493 if(cmd & 0x80)
494 en32(poo, len);
495 MakeSendTCP(game->Players[x],poo,5);
496
497 if(cmd & 0x80)
498 {
499 MakeSendTCP(game->Players[x], data, len);
500 }
501 }
502 catch(int i)
503 {
504 KillClient(game->Players[x]);
505 }
506 }
507}
508
509static void TextToClient(ClientEntry *client, const char *fmt, ...) throw()
510{

Callers 2

CheckNBTCPReceiveFunction · 0.85
BroadcastTextFunction · 0.85

Calls 3

MakeSendTCPFunction · 0.85
KillClientFunction · 0.85
en32Function · 0.70

Tested by

no test coverage detected