简体   繁体   中英

Networking differences in Java

//Java Socket Programming

In Java a client knows IP address and Port Number of the server, but how is the server able to make a Socket Connection with the client(and make input and output streams)? ie how/when/where the server gets knowledge about the client.

The client connects to the server using TCP/IP, and when the server receives the packets, the client's IP and other details are included.

Just like when someone calls you, you see what number is calling, or better yet their name (this would be similar to the DNS server knowing that the IP 192.0.0.1 is actually somedomain.com).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM