SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
Two main categories of sockets exist: datagram sockets (connectionless) and stream sockets (connection oriented). Datagram sockets or connectionless sockets allow for data exchange between entities without establishing a connection before any data delivery. In this category the data integrity and packet order are not ensured.
Stream sockets or connection-oriented sockets require establishing a connection between the two entities before any data exchange. While the connection is maintained, data integrity and the order are ensured. Programmers should choose between connection-oriented transport protocol and connectionless transport protocol according to the requirements of their applications. For example, VoIP applications, which are sensitive to delays, may require the connectionless transport protocols. File transfer applications may require connection-oriented transport protocol due to the guaranty of data integrity and packet ordering.