Вопрос

I have Created A UDP Server-Client application. There is only single thread at Server's side which continuously executes recvfrom(). If I run 3 Clients Simultaneously from 3 different machines, and send some data, the Server is able to read the data from each of the client. But how can I test the reliability of this application? How would I know how many Maximum number of Clients can this Server handle at a time? Also what is the maximum Payload?

Это было полезно?

Решение

But how can I test the reliability of this application?

Run as many clients as you can. The more clients you can run and send data, the better. Try to run many clients of different machines, and on each machine try to run as many clients as you can, and keep sending data automatically.

Make the clients send data in a loop, without waiting for input, and put a delay between each call to send. A few seconds of delay is fine, then you can lower the delay later and see how your server is handling it.

How would I know how many Maximum number of Clients can this Server handle at a time?

You can't. You are using a UDP server, and UDP is connectionless. Clients do not need to connect to the server to send data, they just send it. Usually it is limited by available resources (memory, etc.) on your server.

Also what is the maximum Payload?

The maximum payload of what? A UDP message? You can read more about the UDP packet structure.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top