Delphi Socket and Indy
Each TCP connection takes place though a port, which is represented by a 16-bit number. The IP address and the TCP port together specify an Internet connection, or a socket. Different processes running on the same machine can not use the same socket(the same port). The term Protocol is a set of rules the client and server agree on to determine the communication flow. Standard Protocol and Port values are as follows: HTTP (hypertext transfer protocol) -> 80 FTP (file transfer protocol) -> 21 SMTP (simple mail transfer protocol) -> 25 POP3 (post office protocol, version 3) -> 110 Telnet -> 23 Local Domain NameHow does the IP address map to a name ? On the Internet, the client program looks up the values on a domain name server. But it is also possible to have a local host file, which is a text file you can easily edit to provide local mappings. Look at the HOSTS.SAM file (installed in a subdirectory of the Windows directory or folder. depending on the version of Windows you have) to see a sample You can eventually rename the file HOSTS with out the extension, to activate local host mapping. Foundation of Socket ProgrammingThe heart of the Internet is the Transmission Control Protocol / Internet Protocol (TCP/IP), a combination of two(2) separate protocols that work together to provide connections over the Internet (and that can also provide connection over a private intranet). In brief, IP is responsible for defining and routing the datagrams (Internet Transmission units) and specifying the addressing scheme. Specific IP addresses are reserved for unregistered internal networks. Internet routers ignore these address ranges, so you can freely do your tests without interfering with an actual network. For example, the "free" IP address range 192.168.0.0 through 192.168.0.255 can be used for experiments on a network of fewer than 255 machines. Oh, and the loop back address is 127.0.0.1 by the way... |
| ||||







