From: John Kelly on
On Wed, 23 Jun 2010 19:27:41 -0700, Keith Keller
<kkeller-usenet(a)wombat.san-francisco.ca.us> wrote:

>Aren't you the same guy who posts repeatedly about the dh program, even
>though the few people who made any reply asked you to stop? See e.g.
>
>http://groups.google.com/group/comp.unix.shell/browse_thread/thread/42bf7ae993e6f97b

Seebs is only one person. And I don't read his posts.

But why should that concern you, in this thread? Are you a troll too?


--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php

From: John Kelly on
On Wed, 23 Jun 2010 19:17:54 -0700, Xho Jingleheimerschmidt
<xhoster(a)gmail.com> wrote:

>> Stein's example didn't explain the relationship between the Local and
>> Peer arguments when using SOCK_DGRAM.
>
>Unfortunately your example doesn't seem to explain that relationship,
>either.

I thought the code made it clear. What don't you understand about it?


--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php

From: Keith Keller on
On 2010-06-24, John Kelly <jak(a)isp2dial.com> wrote:
> On Wed, 23 Jun 2010 19:27:41 -0700, Keith Keller
><kkeller-usenet(a)wombat.san-francisco.ca.us> wrote:
>
>>Aren't you the same guy who posts repeatedly about the dh program, even
>>though the few people who made any reply asked you to stop? See e.g.
>>
>>http://groups.google.com/group/comp.unix.shell/browse_thread/thread/42bf7ae993e6f97b
>
> Seebs is only one person. And I don't read his posts.

Did you know that "e.g." means "for example", as in "this is one example
of many"?

> But why should that concern you, in this thread? Are you a troll too?

It concerns me because people who engage in trollish behavior shouldn't
be accusing others of trolling. But I certainly won't carry on the
debate any further. (Or perhaps "take the bait" is more apt.)

--keith

--
kkeller-usenet(a)wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

From: Xho Jingleheimerschmidt on
John Kelly wrote:
> On Wed, 23 Jun 2010 19:17:54 -0700, Xho Jingleheimerschmidt
> <xhoster(a)gmail.com> wrote:
>
>>> Stein's example didn't explain the relationship between the Local and
>>> Peer arguments when using SOCK_DGRAM.
>> Unfortunately your example doesn't seem to explain that relationship,
>> either.
>
> I thought the code made it clear. What don't you understand about it?
>
>
Why are you unlinking them? What point does $node serve in the client?

Xho
From: John Kelly on
On Wed, 23 Jun 2010 20:15:19 -0700, Xho Jingleheimerschmidt
<xhoster(a)gmail.com> wrote:

>John Kelly wrote:
>> On Wed, 23 Jun 2010 19:17:54 -0700, Xho Jingleheimerschmidt
>> <xhoster(a)gmail.com> wrote:
>>
>>>> Stein's example didn't explain the relationship between the Local and
>>>> Peer arguments when using SOCK_DGRAM.
>>> Unfortunately your example doesn't seem to explain that relationship,
>>> either.
>>
>> I thought the code made it clear. What don't you understand about it?
>>
>>
>Why are you unlinking them?

IO::Socket::UNIX->new does a bind() for you, automatically. If the name
already exists in the filesystem, bind() will fail.


>What point does $node serve in the client?

This can be confusing, and that's why I posted.

To achieve two way communication over UNIX datagram sockets, both server
and client must bind to a socket. But NOT THE SAME ONE!

The server binds to the server socket, and the client binds to the
client socket. Notice that two different file names are required.
That's what Local => $node is for. They each bind to their own "Local"
socket.

Then the server sits there and waits for incoming connections on his
"Local" /tmp/server.sock.

Now say the client wants to talk. He's already bound his own "Local"
/tmp/client1.sock. But he also has to specify what "Peer" he wants to
talk to, in this case the server, which resides at /tmp/server.sock.

When the server gets a packet from the client, he knows where it came
from, because the client did a bind() to his own "Local" client socket
before sending. If the client omits the bind() step, the client can
send to the server, but the packet will not carry a peer address, and
the server won't know where it came from.


>Xho

--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php