recv, send implemented, prototype of handling server stuff added