Since all AB controllers no longer provide serial communications by default, the TCP socket was added as a default feature. This was necessary unless an additional serial communication card was added. I've been using the TCP feature since the change.
Rockwell provided some sample code for Client and Server. I use the TCP Client for printing to office printers and data transmitting to a server application for data storage. The sample code was stable and effective. The current sample code is provided as an AOI, but the sample I used was a routine import.
I added some automatic timeouts to stop the transmitting and deleting the sockets when no communication can be established such as a printer being turned off or an Ethernet cable is disconnected. I also added a delay timer to slow the output transmission of each print buffer line (default 250ms per line). This works well when printing to kiosk serial printers through a device server.