changed network functionality so that sockets are kept open. TODO: use
Send class in server (sends in receive thread atm)