I don't know anything about sockets, but taking a quick look at the help file, I'd say you'd need to open the connection before you do anything else.

/help /sockopen

I apologize if I'm wrong, but it's just a suggestion. :P