Name | Modified | Size | Downloads / Week |
---|---|---|---|
TCP Client Server Communication with Time Out C | 2011-03-31 | ||
README | 2011-03-31 | 1.2 kB | |
Totals: 2 Items | 1.2 kB | 0 |
This is a simple project to illustrate how to use a timed alarm, in order to close the connection if after a number of seconds the client is not sending any signals. The user starts first the server, then the client. In the client terminal window, the user enters numbers as float. The server will send signals back to the client according to the following rules: 1. if the received array of chars can be interpreted as float, the client will be notified that the number is ok. The server adds the number interpreted as float to the sum. 2. if the array contains alphabetic chars, the server will send a message to the client, notifying it that the message will be ignored as it contains alphabetic chars. 3. if interpreting the array of chars as float, will generate an overflow, the overflow flag will be sent to the client and the connection will be closed. 4. if the client is not sending any message for 10 seconds, the Time_Out message will be sent to the client and the connection will be closed. 5. if 0 is received from the client, the final sum will be computed and it will be sent back to the client. 6. the client will display the received sum after getting it from the server.