TCP in C Programming -


i want know how client or server gets acknowledgement packet client or server after sending packet in tcp channel in c programming.

why don't need handle in code? how client receive acknowledgement packet, if sends data packet server? happen internally?

the tcp protocol designed provide stream protocol. typical programming interface socket interface can give chunk of data protocol stack transfer receiver. actual implementation hides when data has been queued in receiving protocol stack or has been handed off receiving application. have make distinction.

sou apparently want signal mechanism know, , when client has read data protocol stack. can done designing , implementing protocol on top of tcp protocol. when 1 side doesn't have send meaningful data sends heartbeat message. message indicates tcp connection still alive.

regarding questions:

  • why don't need handle in code? because underlying layer has done your.

  • how client receive acknowledgement packet, if sends data packet server? don't need care long don't need heartbeat. tcp provides stream interface similar interface file i/o. don't ask, when data has left disk cache, you? when start re-implement internas have define reassemblies, nagle-algorithm , many other nasty things. never implement tcp if have choice.

  • does happen internally? yes, fortunately.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -