basic socket connecting and sending message