port : Java Glossary
©1996-2017 Roedy Green of Canadian Mind Products
The word port has at least three meanings:
- As a verb, it means to adapt a program to run on a different computer,
SQL (Standard Query Language) database, language, or Servlet womb, etc.
- In the context of hardware, it refers to the channel that data gets from the
I/O devices to the RAM (Random Access Memory) via the
CPU (Central Processing Unit). A hardware port can be a serial port for a modem to
connect to, or a parallel port for a printer to connect to. It simply deals with
the handshaking of sending a single character at a time to an external device.
- In the context of TCP/IP (Transmission Control Protocol/Internet Protocol),
UDP (User Datagram Protocol) or ICMP (Internet Control Message Protocol)
network communications it refers to a socket number to allow multiple channels to
be operating independently between two computers. The Internet’s
DNS (Domain Name Service)
/ IP (Internet Protocol) protocols
only deal with delivering a packet to the right computer. Once arrived the
packets must be assembled in order into messages and delivered to the right
application. Applications are assigned numbers from 0
to 65535 called ports. Any message destined for port
80, for example, is delivered to the application
handling HTTP (Hypertext Transfer Protocol) requests.
The port number can be explicitly embedded in a URL (Uniform Resource Locator)
like this www.mindprod.com Port numbers above
1023 are up for grabs on any machine for your own code.
Others have standard assignments. IANA (Internet Assigned Numbers Authority)
maintains the list of well known port numbers.
IN Windows Server 2003 you can find out which process in using which port
with the Netstat -nao command.
|echo, used for testing.
|DayTime, returns date/time as a string.
|FTP (File Transfer Protocol)
||20 and 21|
|SMTP (Simple Mail Transfer Protocol)
|Time, returns 32-bit days since 1900/01/01.
|POP3 (Post Office Protocol version 3)
|NTP (Network Time Protocol)
64-bit number with 32
bits as the integer
and 32 bits as the fractional portion
of seconds since 1900/01/01.
|SNTP (Simple Network Time Protocol)
At a hardware level are special registers called ports. When
you write them you output to external I/O devices such as serial ports, parallel
ports or hard disk controllers. When you read from them, you input from I/O devices.
|Serial Port Assignments|
|Parallel Port Assignments|