added connect and send methods

I made a couple of changes. First, I removed the definition of the socket variable, and put it into the 'connect' method that I added. The reason is because I need to connect to a server, and I'd like to be able to pass that in to this lib, without having it run connect and fail first. Second, I added a 'send' method, because it was missing. 

The change to how the socket variable is initialized might have an impact on its usage, so you might want to figure out a better way of doing that. Otherwise, good work, and thanks for providing this lib!