can anyone with socket programming help me out?
I am trying to implement stop and wait protocol.
https://www.dropbox.com/s/sv1yywzrr52w0j4/tcp_client3.c
https://www.dropbox.com/s/922uryv8zzm3tlx/tcp_ser3.c
https://www.dropbox.com/s/jg6s7opjcbkph66/headsock.h
My results seems wrong. My client is sending a text file to server. The client output is right but the server is wrong. My server only receive part of it, about 300 bytes short. Also, my server is not getting right packet size. E.g client sent 1800 byte, my server only receive about 1440 per trip.
Just to clarify if someone spot this as mistake, I use "break" early in my server because n= -1 and will give me error. Any help?
I am trying to implement stop and wait protocol.
https://www.dropbox.com/s/sv1yywzrr52w0j4/tcp_client3.c
https://www.dropbox.com/s/922uryv8zzm3tlx/tcp_ser3.c
https://www.dropbox.com/s/jg6s7opjcbkph66/headsock.h
My results seems wrong. My client is sending a text file to server. The client output is right but the server is wrong. My server only receive part of it, about 300 bytes short. Also, my server is not getting right packet size. E.g client sent 1800 byte, my server only receive about 1440 per trip.
Just to clarify if someone spot this as mistake, I use "break" early in my server because n= -1 and will give me error. Any help?