Socket shit

worked mostly on communicate function. tested with external client and
server