How to write a socket client to connect my own server?

Hi,

this one should get you started: