How to communicate over sockets

i have a pc app for vision tracking but i cannot figure out how to send the data to the robot the application supports socket, serial, ect can someone please help me with some code, thanks