I have a few ‘beginner’ questions regarding the TCP protocol and the easyTcpSocket/tcpSocket classes. In the XOJO documentation, under ‘tcpSocket’, there is the following verbiage:
‘Because of the amount of error checking and handshakes, TCP is an extremely reliable protocol. When you send a packet of information, it is guaranteed to make it to the remote machine unless you have been disconnected, either abortive or orderly.’
So, regarding this, and using the ‘easyTcpSocket.sendMessage’ method, is it safe to assume the following (assuming the connection is not broken during communication):
- The data will always be successfully sent.
- The data will be free of corruption.
- The data will arrive in order (incase of the Xojo custom sendMessage, the message will arrive as a whole completed message just as it was sent).
The reason I’m asking is to determine if I need to include my own checks and validations on the data to ensure these factors.
One other question… regarding the easyTcpSocket documentation:
'The EasyTCPSocket class is designed only for easy communication among Xojo applications on the network. It is not designed to be the basis for custom TCP-based communication protocols. It works only for other applications that implement the EasyTCPSocket protocol. ’
I’m using this as indicated; however, the two applications are not locally. They are remote (about 100 miles apart) and as such encounter normal internet-type issues such as higher transmission/ping times, possible timeouts, etc. Is the ‘easyTcpSocket’ still an acceptable solution, or should I be looking into the ‘tcpSocket’ class? Again, I’m only still communicating between two Xojo-based applications and no other TCP sockets or devices. Thanks!