Python Forum
Question concerning function of a a socket
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question concerning function of a a socket
#4
(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).
Reply


Messages In This Thread
Question concerning function of a a socket - by pkm - Jan-17-2019, 06:25 PM
RE: Question concerning function of a a socket - by nilamo - Jun-03-2019, 09:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  socket.connect question about parenthesis pace 1 2,458 Jan-30-2021, 08:17 AM
Last Post: Gribouillis
  Function that searches and shows all socket hosts shaanukstar123 1 2,231 Jan-30-2020, 05:52 PM
Last Post: Gribouillis
  UDP Socket Basic question zeeshannnetwork 2 3,202 Sep-10-2018, 02:25 AM
Last Post: zeeshannnetwork
  Raw socket sendto function errors IronReign 5 6,633 Jul-09-2017, 04:46 PM
Last Post: Blue Dog

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020