Drax
Drax

Reputation: 151

TCP - Possible to send data without active listener?

Is it possible for client side to send data to a TCP port, to then later collect using a listener, or does the TCP in all cases need an active listener to even send the information?

The idea is to use TCP as an email alternative, i.e to send using client TCP program and receive using listener.

Upvotes: 0

Views: 645

Answers (1)

Rowan Smith
Rowan Smith

Reputation: 2180

No. You will need to have a Listener so that the TCP session can send the data in the first place.

While technically it's possible to send packets after the Listener has vanished (eg crashed), this results in those sent packets being lost and isn't really what you are looking for.

It's not technically possible to send data unless a TCP connection is established, for which you need a Client and Listener. This establishment feature is defined in the TCP Protocol and is often called a TCP handshake.

Upvotes: 1

Related Questions