Transmission Control Protocol

The big complex beast that turns an infrastructure of volatile packets into a magic tunnel where things actually come out the way they went in.

Advantages of TCP are:

  1. as long as you pay attention to error messages and close your connection properly, you can be sure things made it to the other side (alright, it gets trickier when cheap DSL routers, funny firewalls or GPRS are in the game, but for proper interserver communications this still holds true)
  2. you can skip sending counters and Packet Ids as their order in the stream makes them implicit
  3. you shouldn't need retransmission schemes

PSYC supports both TCP and UDP. UDP is used by default when only a _notice is about to be sent, and a circuit hasn't been created yet.

The circuit concept of PSYC puts an abstraction layer on top of TCP to ensure things work even when TCP doesn't.

Techie details on Wikipedia:Transmission Control Protocol.

TCP suboptimal for file transfer

In situations of lossy links, like a flaky wireless LAN, a file transfer using a TCP socket can become very tedious: Every few seconds a packet is missing and the entire transfer is halted for recovery. It would probably be more efficient if a protocol was being used that has a suitable transfer rate to get most data through, but doesn't halt on dropped packets - merely resends them later. The receiving side needs the ability to reconstruct the file from its fragments in a technique like Gnutella or BitTorrent. This means essentially re-inventing TCP minus just a little impractical thing.