Sockets (Datagram or SockStream)

Started by
1 comment, last by kuphryn 17 years, 11 months ago
Hello all, I planning to use sockets to bind all classes to the global event class. All classes can register for events. All these classes instantiated in the same process, so in other words data remains on the same PC. Now my question: If choosing Datagram as sockettype, is it a 100% reliable connection. Does the packet always arrives. I know when you communicate with an other PC you cannot be sure. Regards, Xeile
Advertisement
The UDP datagram is not reliable at the transport-level. You must add onto the datagram yourself in order to add a layer of redundancy.

Or you could use the TCP stream. The stack implementor's software handles the redundancy for you. (ie: winsock on windows, sockets on bsd, linux, unix)

TCP reliable and good for data transfer

UDP fast unreliable and good for games

Kuphryn

This topic is closed to new replies.

Advertisement