Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inet Socket and Socket?

Tags:

c#

sockets

inet

Can anybody tell me the difference between a INET Socket and any other socket?

Is there a C# library that will allow one to work with INET Sockets?

I've attempted to find what it is, but I haven't found anything very useful. I'm suspecting it's something from the UNIX world.

like image 498
Tony The Lion Avatar asked Feb 21 '10 09:02

Tony The Lion


People also ask

What is inet socket?

A socket is just an abstraction of a communication end point. Original communication between the entities may use different methods for communication. INET sockets in linux are Internet Sockets i.e IP protocol based sockets but there are many other types.

What are the two types of sockets?

Sockets come in two basic types—connection-oriented and connectionless.

Why does TCP need 2 sockets?

The reason is that TCP has two different kinds of state that you want to control, whereas UDP has only one.


1 Answers

A socket is just an abstraction of a communication end point. Original communication between the entities may use different methods for communication. INET sockets in linux are Internet Sockets i.e IP protocol based sockets but there are many other types. One that I recently had to deal with are Netlink sockets which are used as IPC mechanism between a user process and linux kernel. As opposed to INET sockets which use IP addresses and ports, Netlink sockets use linux process IDs to identify communicating parties. On any standard Linux machine you can open file /usr/include/linux/socket.h and look for AF_MAX. Its a macro giving the number of protocol families supported by current socket api. On my machine its 37.

I dont know if there is any thing called INET socket in Windows API or not. Havent done much development for Windows.

like image 108
binW Avatar answered Oct 06 '22 18:10

binW