add prototype
finish connect to server
listen