[comp.windows.news] Sockets: Can a NeWS process be a client?

huelsbec@hbo.UUCP (David Huelsbeck) (03/14/90)

My coworkers and I have only recently joing the mailing list, so
I'll apologize in advance in the event that this subject was just
discussed at length last week.  Sorry.

The subject says it all.  Is there a means of doing and open_connection()
call from a NeWS process so that it can take on the client role?  From
what I can tell from the documentation I'd have to say that the answer is
"No.", but it seems like such a natural thing to want to do they must have
provided some way of doing it.  Right?  ;-)

Oh, we're still waiting on the new release of NeWS, (i.e. we're using 1.1)
if that has any thing to do with it.

Thanks,
-dph     (you ... atlantis.ees.anl.gov!hbo!huelsbec)

               David P. Huelsbeck
               Applied Computing Systems, Inc

deven@rpi.edu (Deven T. Corzine) (03/15/90)

On 14 Mar 90 09:30:40 GMT, huelsbec@hbo.UUCP (David Huelsbeck) said:

David> My coworkers and I have only recently joing the mailing list, so
David> I'll apologize in advance in the event that this subject was just
David> discussed at length last week.  Sorry.

Hasn't recently...

David> The subject says it all.  Is there a means of doing and
David> open_connection() call from a NeWS process so that it can take
David> on the client role?  From what I can tell from the
David> documentation I'd have to say that the answer is "No.", but it
David> seems like such a natural thing to want to do they must have
David> provided some way of doing it.  Right?  ;-)

The answer is in fact "Yes."  It's not documented, but it exists.
Basically, instead of:

    (%socketl123) file

You use:

    (%socketc123.host.domain) file

Ugh.  It's been a while since I've done it, so I may be
misremembering, but I know that the key is to do the same as you would
to open an incoming socket (that's documented), but replace the
(%socketl<portnum>) with (%socketc<portnum>.host).  I hope I
remembered that right; I've had the hardest time remembering the
proper format for host & port for an outgoing socket.  But I think
it's port number followed by any nondigit separator and then the host.
I know you replace the %socketl with %socketc.  ("socket listen" ->
"socket connect")  Anyway, give it a try.  If that format doesn't
work, Email me and I'll root around for the info I have somewhere, or
I'll try it.

David> Oh, we're still waiting on the new release of NeWS, (i.e. we're
David> using 1.1) if that has any thing to do with it.

It works under NeWS 1.1...

Deven
-- 
Deven T. Corzine        Internet:  deven@rpi.edu, shadow@pawl.rpi.edu
Snail:  2151 12th St. Apt. 4, Troy, NY 12180   Phone:  (518) 274-0327
Bitnet:  deven@rpitsmts, userfxb6@rpitsmts     UUCP:  uunet!rpi!deven
Simple things should be simple and complex things should be possible.