Inet Socket and Socket?

Tony The Lion picture Tony The Lion · Feb 21, 2010 · Viewed 8.2k times · Source

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.

Answer

binW picture binW · Aug 2, 2010

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.