removed receive and disconnect handler from client and server constructor