Hello everybody. Maybe is just a silly question but I have no clear answer. When I see examples of TCP three way handshake (even those shown in RFC 793), the device which first send the SYN segment (client) is always the device which, after connection is estableshed, begins sending data to the device which was listening (server). But is the opposite possible? Can the server begin sending data after connection is estableshed by the client? Is this documented anywhere? Could you provide some samples? I didn't find anything regarding this question. Regards. asked 03 Oct '13, 07:58 selecnor |
2 Answers:
Certainly ! The sequence of transmissions depends completely upon the programming of the 'client' and the 'server'. In fact, the two sides might be 'peers' with each sending data to the other simultaneously. IOW: the TCP connection provides two one-way pipes (A-->B & B-->A) which can be used however desired and with whatever co-ordination between the pipes is desired. answered 03 Oct '13, 08:37 Bill Meier ♦♦ |
Other examples include Telnet (which isn't used that much) which will advertise capabilities and a prompt, as well as a modern version SSH. Here you can see after the 3-way handshake, in frame 266, the Server advertises what type of SSH server it is, without input from the client. answered 03 Oct '13, 18:07 martyvis |
Thank you, clear and short explanations as i needed. By the way, how does awarding point work? ;-)
(Hit the 'accept' button (checkmark icon) to the left of the answer to 'accept' the answer; points will be awarded).
by the way, just as an example of the sender sending data after the handshake you could take a look at a passive FTP-DATA session.
But what then happens if, suppose, both the client and server send a message simultaneously — wouldn't the TCP of both sides then wait for ack message, which, of course, never appear because they both are awaiting?
Sending and receiving are independently handled and guarded by timers. If the timer expires before a new segment is send an 'empty' TCP packet will be send anyway just to convey the flags and protocol values.