server and client establish connection

almost ready to implement bootstrap and main protocol