Socket mystery

Tcp / IP protocol is currently the world's most widely used protocol is based on Tcp / IP protocol is based on the multiple levels of collection. Also known as Tcp / IP protocol suite or Tcp / IP protocol stack.

TCP: Transmission Control Protocol

IP::Internet Protocol

Tcp / IP five layer model : the physical layer, data link layer, network layer, transport layer, application layer (HTTP, FTP, SMTP, Telnet ).

IP and port number to make the so-called socket, socket is the end point of a two-way communication link between programs running on the network, is the basis of TCP and UDP

Common protocol port number corresponding to : HTTP: 80 FTP: 21 Telnet : 23

Java in network support :

  InetAddress used to represent the hardware resources on the network

  URL: Uniform Resource Locator

  Sockets: using TCP protocol network traffic class associated socket

  Datagram: using the UDP protocol, the data stored in the datagrams, communicate over the network

Thinking server and multi-client communication

  Creating a thread on the server side class, the server is established when a socket connection to start a thread to complete response, so an infinite loop.

Guess you like

Origin www.cnblogs.com/niuyg928/p/11285660.html