Path: utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!uwm.edu!rpi!netserv2!deven From: deven@rpi.edu (Deven T. Corzine) Newsgroups: comp.windows.news Subject: Re: Sockets: Can a NeWS process be a client? Message-ID: Date: 14 Mar 90 18:45:19 GMT References: <9003140206.AA10015@> Organization: Rensselaer Polytechnic Institute, Troy, NY Lines: 48 In-Reply-To: huelsbec@hbo.UUCP's message of 14 Mar 90 09:30:40 GMT 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) with (%socketc.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.