Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.

Tcp, Udp, Http

I really had no idea between TCP and UDP.

This did a nice comparsion: Transmission Control Protocol ensures a reliable and ordered delivery of a stream of bytes from user to server or vice versa. User Datagram Protocol is not dedicated to end to end connections and communication does not check readiness of receiver.

  • HTTP uses TCP connection. But HTTP uses only one TCP connection.
  • Use persistent plain TCP sockets if both client and server independently send packets but an occasional delay is OK (e.g. Online Poker, many MMOs).
  • Use UDP if both client and server may independently send packets and occasional lag is not OK (e.g. Most multiplayer action games, some MMOs).

And there is always this