English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

6 answers

Socket

In UNIX and some other operating systems, a software object that connects an application to a network protocol. In UNIX, for example, a program can send and receive TCP/IP messages by opening a socket and reading and writing data to and from the socket. This simplifies program development because the programmer need only worry about manipulating the socket and can rely on the operating system to actually transport messages across the network correctly. Note that a socket in this sense is completely soft - it's a software object, not a physical component.

Port

In TCP/IP and UDP networks, an endpoint to a logical connection. The port number identifies what type of port it is. For example, port 80 is used for HTTP traffic. Also see Well-Known TCP Port Numbers in the Quick Reference section of Webopedia.

In recent times, Port and Socket have been munged together to mean the same thing. Socket really is a part of programming and Port is more for networking (even though at times they are the same thing)

Tom

2006-12-29 05:06:27 · answer #1 · answered by Cafetom 4 · 0 0

A socket is a handle to a connection or a particular software "window" through which data can be sent or received. A "port" is a numerical address to which data can be sent or received. For example, consider a web server. It generally accepts connections on a single port (TCP port 80 for a typical web server). But if it has ten connections at the same time from ten different clients, it will communicate with each of those ten connections on its own socket. (Otherwise, the data might go to the wrong client, or it wouldn't know which client data it received came from.)

2016-03-28 23:49:56 · answer #2 · answered by Anonymous · 0 0

A socket is like a filehandle, but for an Internet connection. A port is a number that is used to separate multiple connections to (or from) a computer. A computer running multiple servers would for example receive Web connections on port 80, email connections on port 25, AIM connections on port 5190, etc.

In traditional (Internet) network programming, you need to create/get a socket for transmitting data over the network. When creating the socket, you'd tell it the computer address you want to connect to, including the port.

A lot of newer languages allow you to bypass this step, doing it for you behind the scenes, so you can just make a Web connection without worrying about the administrivia of sockets.

2006-12-29 05:15:07 · answer #3 · answered by romulusnr 5 · 0 0

Sockets is not neccessary associate with IP address and port number, for example Unix Socket could communicate to each other over a file handle.

Port is a number that being bind with an IP address. Any unique pair of IP address and port is the connecting point for an application over the network. Port range is 1-65535, with port number under 1024 considered important ports many has reserved purpose.

2006-12-29 05:06:31 · answer #4 · answered by john j 2 · 0 0

A socket is a combination of Protocol (TCP, UDP, raw IP)
Local IP address, Local port, Remote IP address, Remote port information being used over TCP/IP.

A port, which as you can see above is found within a socket, is simply theoretical communication line. This helps your computer communicate with other computers and sort out how certain data types will be processed. For example, when you request a web page, your computer sends a message to the web page computer telling it to send the information over port 80, It tells that computer what its address is, what port to send it to, what protocols its using. This combined information is the socket. The web server then sends your computer the web page over port 80, a predesignated line for that type of data.

2006-12-29 07:53:14 · answer #5 · answered by XeroAngel 2 · 0 0

Sockets go over feet and Port means right or left depending on which way your facing.
Sockets are also types of wine and Port is a tool used to drive male shovenistic nuts.
Socket is male, protrude, and port is female. It is polite terminology without having to get sexual about it.

2006-12-29 05:08:12 · answer #6 · answered by Anonymous · 0 1

fedest.com, questions and answers