how to connect to TCP\UDP server and listen up on him

so i want to pass information through my server to me using a TCP\UDP server… 

so i found out this code from the example > 

https://coronalabs.com/blog/2014/09/23/tutorial-local-multiplayer-with-udptcp/

and i really want to use it only one question 

“createClientLoop( sock, ip, port )”

you need to pass a sock, ip and port, what is the cock you need to pass ?

lastly, is there a server i can check everything if it works ?

i mean i can’t check it with our server until our server will be ready in a month or so …

lastely did anyone have any expiriance with  zero MQ ?

found this online > 

https://github.com/imatix/zguide/blob/5a636a418a1b7654fe3191c942f9697dab211be0/examples/Lua/identity.lua

suppose to be how to connect with that service using peer to peer…

thank you !!!