added socket function into the tiltmouselistener for communication with
server