Mastering Python for Networking and Security
上QQ阅读APP看书,第一时间看更新

Client socket methods

This is the socket method we can use in our socket client for connecting with the server:

  • socket.connect(ip_address): This method connects the client to the server IP address

We can obtain more information about this method with the help(socket) command. We learn that this method does the same as the connect_ex method and also offers the possibility of returning an error in the event of not being able to connect with that address.

We can obtain more information about these methods with the help(socket) command: