|
|
@ -35,6 +35,7 @@ class Client:
|
|
|
|
async def connect(self):
|
|
|
|
async def connect(self):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
reader, writer = await asyncio.open_connection(self.__ip, self.__port)
|
|
|
|
reader, writer = await asyncio.open_connection(self.__ip, self.__port)
|
|
|
|
|
|
|
|
MessagePrinter.connected(self.__ip, self.__port)
|
|
|
|
except ConnectionRefusedError:
|
|
|
|
except ConnectionRefusedError:
|
|
|
|
sys.stderr.write("Could not connect to the server. Please, check the ip and the port.\n")
|
|
|
|
sys.stderr.write("Could not connect to the server. Please, check the ip and the port.\n")
|
|
|
|
sys.exit(1)
|
|
|
|
sys.exit(1)
|
|
|
|