Jun-03-2019, 09:59 PM
(Jan-17-2019, 06:25 PM)pkm Wrote: As far as I know, the accept method can only be called on a server socket (I come from the JAVA world, where there exists a difference between a Socket and a ServerSocket object). Is the mentioned socket a server socket?
Yes, in Python, a "socket" can be on both ends of the connection. There's no special distinction between listener/connector or server/client, they're just two ends of a pipe. That said, any time you're accepting connections on a socket, you can pretty much guarantee it's a server of some sort (or a peer to peer network, like for gaming, or Tor lol).