Skip to main content
deleted 24 characters in body
Source Link

Depends for which OS you are talking. Socket is SW abstraction of networking endpoint, used as the interface to the application. In Java, C# it is represented by object, in Linux, Unix it is a file. 

Port is just a property of a socket you have specify if you want to receive or send packetsestablish a communication. To receieve datapacket from a socket you have to bind it to specific local port and NIC (with local IP address) or all NICs (INADDR_ANY is specified in the bind call). To send packet, you have to specify remote port and remote IP of the remote socket.

Depends for which OS you are talking. Socket is SW abstraction of networking endpoint. In Java, C# it is represented by object, in Linux, Unix it is a file. Port is just a property of a socket you have specify if you want to receive or send packets. To receieve data from a socket you have to bind it to specific local port and NIC (with local IP address) or all NICs (INADDR_ANY is specified in the bind call). To send packet, you have to specify remote port and remote IP.

Socket is SW abstraction of networking endpoint, used as the interface to the application. In Java, C# it is represented by object, in Linux, Unix it is a file. 

Port is just a property of a socket you have specify if you want to establish a communication. To receieve packet from a socket you have to bind it to specific local port and NIC (with local IP address) or all NICs (INADDR_ANY is specified in the bind call). To send packet, you have to specify port and IP of the remote socket.

added 53 characters in body
Source Link

Depends for which OS you are talking. Socket is SW abstraction of networking endpoint. In Java, C# it is represented by object, in Linux, Unix it is a file. Port is just a property of a socket you have specify if you want to receive or send packets. To receieve or send data from a socket you have to bind it to specific network interface cardlocal port and NIC (with specificlocal IP address). In Linux When INADDR_ANY or all NICs (INADDR_ANY is specified in the bind call). To send packet, the socket will be boundyou have to all local interfacesspecify remote port and remote IP.

Depends for which OS you are talking. Socket is SW abstraction of networking endpoint. In Java, C# it is represented by object, in Linux, Unix it is a file. Port is just a property of a socket. To receieve or send data from a socket you have to bind it to specific network interface card (with specific IP address). In Linux When INADDR_ANY is specified in the bind call, the socket will be bound to all local interfaces.

Depends for which OS you are talking. Socket is SW abstraction of networking endpoint. In Java, C# it is represented by object, in Linux, Unix it is a file. Port is just a property of a socket you have specify if you want to receive or send packets. To receieve data from a socket you have to bind it to specific local port and NIC (with local IP address) or all NICs (INADDR_ANY is specified in the bind call). To send packet, you have to specify remote port and remote IP.

Source Link

Depends for which OS you are talking. Socket is SW abstraction of networking endpoint. In Java, C# it is represented by object, in Linux, Unix it is a file. Port is just a property of a socket. To receieve or send data from a socket you have to bind it to specific network interface card (with specific IP address). In Linux When INADDR_ANY is specified in the bind call, the socket will be bound to all local interfaces.