Not much to comment on, this program is pretty straightforward. A few notes:
- The user of the client has a lot of information to input.
The user of the client has a lot of information to input.
fprintf(stderr, "Usage: %s <Server IP> <Server Port> <Iterations> <Gap>\n", argv[0]);
The more the user has to enter, the steeper the initial learning curve to use the program is. Also, I'm not sure I want the user to control the
<Iterations>
and the<Gap>
anyways. A malicious user might abuse this for a DOS of the server. Eliminating those as required input and setting them in your code would be a more secure and a more user-friendly option.
fprintf(stderr, "Usage: %s <Server IP> <Server Port> <Iterations> <Gap>\n", argv[0]);
The more the user has to enter, the steeper the initial learning curve to use the program is. Also, I'm not sure I want the user to control the <Iterations>
and the <Gap>
anyways. A malicious user might abuse this for a DOS of the server. Eliminating those as required input and setting them in your code would be a more secure and a more user-friendly option.
- You have too many comments.
You have too many comments.
close(clntSock); /* Close client socket */
For that particular example, it is quite obvious what that statement does. There are a lot of other comparable examples in this code.
close(clntSock); /* Close client socket */
For that particular example, it is quite obvious what that statement does. There are a lot of other comparable examples in this code.
- It is more common to
return 0;
whenmain()
is finished, rather than toexit(0)
. Both will call the registeredatexit
handlers and will cause program termination though.It is more common to
return 0;
whenmain()
is finished, rather than toexit(0)
. Both will call the registeredatexit
handlers and will cause program termination though.
Not much to comment on, this program is pretty straightforward. A few notes:
- The user of the client has a lot of information to input.
fprintf(stderr, "Usage: %s <Server IP> <Server Port> <Iterations> <Gap>\n", argv[0]);
The more the user has to enter, the steeper the initial learning curve to use the program is. Also, I'm not sure I want the user to control the <Iterations>
and the <Gap>
anyways. A malicious user might abuse this for a DOS of the server. Eliminating those as required input and setting them in your code would be a more secure and a more user-friendly option.
- You have too many comments.
close(clntSock); /* Close client socket */
For that particular example, it is quite obvious what that statement does. There are a lot of other comparable examples in this code.
- It is more common to
return 0;
whenmain()
is finished, rather than toexit(0)
. Both will call the registeredatexit
handlers and will cause program termination though.
Not much to comment on, this program is pretty straightforward. A few notes:
The user of the client has a lot of information to input.
fprintf(stderr, "Usage: %s <Server IP> <Server Port> <Iterations> <Gap>\n", argv[0]);
The more the user has to enter, the steeper the initial learning curve to use the program is. Also, I'm not sure I want the user to control the
<Iterations>
and the<Gap>
anyways. A malicious user might abuse this for a DOS of the server. Eliminating those as required input and setting them in your code would be a more secure and a more user-friendly option.You have too many comments.
close(clntSock); /* Close client socket */
For that particular example, it is quite obvious what that statement does. There are a lot of other comparable examples in this code.
It is more common to
return 0;
whenmain()
is finished, rather than toexit(0)
. Both will call the registeredatexit
handlers and will cause program termination though.
Not much to comment on, this program is pretty straightforward. A few notes:
- The user of the client has a lot of information to input.
fprintf(stderr, "Usage: %s <Server IP> <Server Port> <Iterations> <Gap>\n", argv[0]);
The more the user has to enter, the steeper the initial user experience learning curve to use the program is. Also, I'm not sure I want the user to control the <Iterations>
and the <Gap>
anyways. A malicious user might abuse this for a DOS of the server. Eliminating those as required input and setting them as variables in your code would be a more secure and a more user-friendly option.
- You have too many comments.
close(clntSock); /* Close client socket */
For that particular example, it is quite obvious what that statement does. There are a lot of other comparable examples in this code.
- It is more common to
return 0;
whenmain()
is finished, rather than toexit(0)
. Both will call the registeredatexit
handlers and will cause program termination though.
Not much to comment on, this program is pretty straightforward. A few notes:
- The user of the client has a lot of information to input.
fprintf(stderr, "Usage: %s <Server IP> <Server Port> <Iterations> <Gap>\n", argv[0]);
The more the user has to enter, the steeper the initial user experience learning curve is. Also, I'm not sure I want the user to control the <Iterations>
and the <Gap>
anyways. A malicious user might abuse this for a DOS of the server. Eliminating those as required input and setting them as variables in your code would be a more secure and a more user-friendly option.
- You have too many comments.
close(clntSock); /* Close client socket */
For that particular example, it is quite obvious what that statement does. There are a lot of other comparable examples in this code.
- It is more common to
return 0;
whenmain()
is finished, rather than toexit(0)
. Both will call the registeredatexit
handlers and will cause program termination though.
Not much to comment on, this program is pretty straightforward. A few notes:
- The user of the client has a lot of information to input.
fprintf(stderr, "Usage: %s <Server IP> <Server Port> <Iterations> <Gap>\n", argv[0]);
The more the user has to enter, the steeper the initial learning curve to use the program is. Also, I'm not sure I want the user to control the <Iterations>
and the <Gap>
anyways. A malicious user might abuse this for a DOS of the server. Eliminating those as required input and setting them in your code would be a more secure and a more user-friendly option.
- You have too many comments.
close(clntSock); /* Close client socket */
For that particular example, it is quite obvious what that statement does. There are a lot of other comparable examples in this code.
- It is more common to
return 0;
whenmain()
is finished, rather than toexit(0)
. Both will call the registeredatexit
handlers and will cause program termination though.
Not much to comment on, this program is pretty straightforward. A few notes:
- The user of the client has a lot of information to input.
fprintf(stderr, "Usage: %s <Server IP> <Server Port> <Iterations> <Gap>\n", argv[0]);
The more the user has to enter, the steeper the initial user experience learning curve is. Also, I'm not sure I want the user to control the <Iterations>
and the <Gap>
anyways. A malicious user might abuse this for a DOS of the server. Eliminating those as required input and setting them as variables in your code would be a more secure and a more user-friendly option.
- You have too many comments.
close(clntSock); /* Close client socket */
For that particular example, it is quite obvious what that statement does. There are a lot of other comparable examples in this code.
- It is more common to
return 0;
whenmain()
is finished, rather than toexit(0)
. Both will call the registeredatexit
handlers and will cause program termination though.