Skip to content

Commit

Permalink
voipchat: Clamp datagram payload to 1200 instead of 1500.
Browse files Browse the repository at this point in the history
Apparently some common routers will drop packets that are larger than
1278 bytes...gave myself a little wiggle room here.
  • Loading branch information
icculus committed Sep 27, 2023
1 parent a3e8f14 commit cc307c2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/voipchat.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,7 @@ int main(int argc, char **argv)
renderer = SDL_CreateRenderer(window, NULL, 0);
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);

max_datagram = 1500;
if (max_datagram > sizeof (scratch_area)) {
max_datagram = sizeof (scratch_area);
}
max_datagram = SDL_min(1200, (int) sizeof (scratch_area));

run_voipchat(argc, argv);

Expand Down

0 comments on commit cc307c2

Please sign in to comment.