The way I'd understand it is that sockets are just one option of many. Its
just pushed more because its the popular one for some reason or other
(although DBus seems to be getting mention more and more often lately..),
as well as being the prefered option by Stevens. Not that i've read the
book.
Personally I wouldnt use networking just to talk between two _local_
processes...seems a little overcomplicated? hopefully somebody with more
experience can explain.
Oren
On Tue, 09 Aug 2005 12:54:25 -0400, William Case <billlinux [ at ] rogers [ dot ] com>
wrote:
Hi;
I am 2/3 the way through Richard Stevens "UNIX Network Programming"
and I seemed to have missed something about sockets. A really quick
short explanation would be helpful. The question I have is:
"Why do I need a socket in the first place?"
A socket is used for interprocess communications, is it not? If I were
to sit down to write a communications program, why would I say to myself
"OK, one of the first things I need is to create a socket"? Why not
shared memory, a buffer, an open user space file to write to and read
from?
Really, most of what I have read in Steven's text, in the man pages or
google I can follow, but nothing I've read answers what to me is the
first question "Why would I do it?" The literature I have read tells me
how to create and use a socket, but nothing states bluntly why.
I'm guessing, but are sockets the only way to communicate between
modules in the kernel and stuff in user space (processes, data,
programs)? And if so, is that accomplished with the system calls?
Regards Bill
_______________________________________________
Linux mailing list
Linux [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
http://www.oclug.on.ca/mailman/listinfo/linux
--
Oren Mazor // Developer, Sysadmin, Explorer
GPG Key: http://www.grepthemonkey.org/secure
"Ut sementem feceris, ita metes"