1
14kviews
What is socket address? Explain with example.
1 Answer
written 7.1 years ago by |
Socket address is the combination of an IP address and port number.
Telephone connection is the combination of a phone number and particular extension.
Number socket is an internal end point for sending or receiving data at a single node in computer network.
There is a corresponding socket address at the foreign node which itself has an associated socket with socket address.
Berkeley socket interface sends the string “Hello world” via TCP to port 80 of the host with address 1.2.3.4 Socket socket = getsocket(type = “TCP”) Connect (socket, address = “1.2.3.4”, port = “80”) Send (socket “Hello, world”) Close (socket)