Find a file
2023-07-25 15:56:27 +08:00
src Finish the test 2023-07-25 15:56:27 +08:00
.gitignore Finish the test 2023-07-25 15:56:27 +08:00
Makefile Finish the test 2023-07-25 15:56:27 +08:00
README Finish the test 2023-07-25 15:56:27 +08:00

# Test Buffer For Udp

This project is used to test if there is a buffer for udp. Let's assume packet
A and B are sent orderly in the same time, the receiver can still read A after
B already arrive, then we think the buffer for udp is exists.

## Program behavier

Server listen on port 23333, receive 1 packet, then sleep for 1 second,
and receive the remain 2 packets, then exit.

Client send 3 packet to 127.0.0.1:23333 without delay.

## Expected result

The expected result is server receive the frst packet at the moment the client
launch, then 1 second later, the server receive the remain 2 packets with no
interval. And the client launch and exit in a very short time.

## Run the program

To run the program, first build the program

    make

then launch server

    ./bin/server

then launch client in another terminal

    ./bin/client

Or if you want one line command

    make ; ./bin/server & ; pid=$! ; ./bin/client ; wait $pid