Re: Reliability of Java, sockets and TCP transmissions



Qu0ll wrote:

I am writing client and server components of an application that communicate
using Socket, ServerSocket and TCP. I would like to know just how reliable
this connection/protocol combination is in terms of transmission errors. So
far I have only been able to run the application where the client and server
are on the same local machine or separated by an intranet/LAN so I have no
results of an internet deployment to report but I have not encountered any
IO errors to this point.

So just how reliable are TCP and Java sockets over the actual internet? I
mean do I need to implement some kind of "advanced" protocol whereby check
sums are transmitted along with packets and the packet retransmitted if the
check sum is invalid or is all this handled by either the Java sockets or
the TCP protocol already?


That is handled by TCP/IP. Each IP datagram contains multiple checksums. There
are at least checksums for the IP header and for the TCP segment (header+data).
Other protocols layered on top of TCP/IP may add their own.

Sockets are very reliable. The Internet is built on them.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@xxxxxxxxxxxx
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
.



Relevant Pages

  • Re: Netstat zeigt UDP established
    ... TCP entleihen um das zu implementieren? ... Auch die TCP Programmierschnittstelle mit ihrer Semantik ist im ... Sockets sind eine Abbildung der Protokollsemantik auf die ... anstatt ein passendes einfach neu zu implementieren. ...
    (de.comp.security.misc)
  • Semantics of SO_REUSEADDR and P2P TCP NAT traversal
    ... I'm working on implementing a TCP NAT traversal scheme for a P2P ... port they are listening on, ... but this is transient - only one of the two sockets at each end ...
    (Linux-Kernel)
  • RE: UDP over Bluetooth
    ... So maybe sockets accessing Bluetooth ... top of TCP? ... TCP, UDP is simpler, faster and cheaper than TCP. ...
    (microsoft.public.win32.programmer.networks)
  • Additional packet data from IM driver?
    ... We have a user-space application using a number of TCP and UDP sockets. ... Our IM driver is classifying all packets based on VLAN and IP header ...
    (microsoft.public.win32.programmer.networks)
  • Re: Jail to jail network performance?
    ... > So in case of MySQL you would have to use TCP sockets to communicate ... This socket type typically consumes more CPU because ... UNIX domain connection are far more dramatic than this would indicate. ... When I wrote mSQL and added UNIX domain sockets as a connection option ...
    (freebsd-stable)