linux - Unix vs BSD vs TCP vs Internet sockets? -


i reading linux programming interface , describes several different types of socket used on linux:

  • unix domain
  • berkeley
  • tcp
  • internet

one of things book said if want communicate between remote hosts, couldn't use unix domain sockets because ipc on same host. have use "internet" sockets.

however, still little confused how relates "tcp" sockets, berkeley sockets , other 2? relationship? why have internet socket tcp socket?

in short trying understand (have missed out?) various different types of unix sockets , under circumstances use them?

a socket abstraction. tag definition used on socket any:

an endpoint of bidirectional inter-process communication flow. refers process flow on network connection, no means limited such.

so major distinction sockets (1) use network , (2) sockets not.

unix domain sockets not use network. api makes appear (mostly) same developer network socket communication done through kernel , sockets limited talking processes on machine upon running.

berkeley sockets know network sockets on posix platforms today. in past there different lines of unix development (e.g. berkeley or bsd, system v or sysv, etc.) berkeley sockets won in marketplace , synonymous unix sockets today.

strictly speaking there isn't tcp socket. there network sockets can communicate using tcp protocol. it's linguist shorthand refer them tcp socket distinguish them socket using protocol e.g. udp, routing protocol or whatnot

an "internet" socket meaningless distinction. it's socket using network protocol. eliminates unix domain sockets,but network protocols can used communicate on lan or internet, collection of networks. (though note there protocols specific local networks manage collections of networks.)


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -