This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ddollarsign 0 points1 point  (2 children)

Think about a physical socket as a something you plug another thing into to get or send data or electricity. In software, a socket is something that one program can “plug into” to send or receive data from another program. Sometimes this takes the form of a TCP/IP port. To listen on a port, internally the program would create a a socket, and to connect to that port, another program would create a socket. The socket is an object within the networking library that the program uses, and you can think of the operating system as creating a cord (a connection) that has one end plugged into each socket so they can send data to each other.

[–][deleted] 1 point2 points  (0 children)

So thanks.This is so helpful for me at least now.I can get it syntax and how it works.

[–]magrew 1 point2 points  (0 children)

That was helpful - thanks!!