TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Joel Downer
date: 1996-02-05 21:20:00
subject: Remote Pipe Question...

Hi, folks!

I'm hoping someone can share some expertise with me regarding support
for named pipes in a networked environment.  My Iron Ox/2 door does its
multinode communications using named pipes; it's had this feature for
about a year and a half, and I'd regard the pipe code as fairly
well-tested.  However, I'm *not* sure how many registrees are running
the game across LANs (as opposed to running multiple nodes on one
machine), and I have no beta testers running OS/2 LANs.

Anyway, this afternoon I got a report that my game was failing to create
a remote pipe (returning error 3, or invalid pathname).  My code allows
the sysop to specify the pipe name so that he/she can include a server
name, and the sysop here appears to be using the correct one given the
server name of sys2:

PE>\\sys2\pipe\oxpipe

(The user is using Maximus named pipes on his system without trouble.)

Judging by the error output of my program, the door appears to be
parsing and manipulating the pathname correctly (it appends the BBS node
number to create a unique inbound pipe):

PE>Error 3 creating pipe (\\sys2\pipe\oxpipe.0)!
PE>Critical Error: Can't create message queue!

The code that creates the pipe is quite simple:

sprintf(pipename, "%s.%d", od_control.od_pipe_name, od_control.od_node);

openflags = NP_NOWRITEBEHIND | NP_INHERIT | NP_ACCESS_INBOUND;

pipemode = 0x01 | NP_WAIT | NP_TYPE_MESSAGE | NP_READMODE_MESSAGE;

if ((rc = DosCreateNPipe(pipename, &hMsg, openflags,
   pipemode, 0, 1024, 0)) != NO_ERROR)
   {
   printf("\nError %d creating pipe (%s)!", rc, pipename);
   return(ERROR);
   }
else
   return(OK);

Now... I'm a relative novice at OS/2 LAN setup (I just set up a simple
Warp Connect Peer LAN for file and printer sharing a couple months ago,
and I don't run my BBS across the LAN) but when I try to create a pipe
on my server (pipename:  \\BBSSERV\PIPE\OXPIPE), I'm getting the same
error.

Question:  Am I doing anything obvious wrong in the above code?  Or is
there something important I'm missing about remote pipes -- i.e., do I
have to create them with a different API call?  Any suggestions would be
welcome... and I apologize if this is a dumb question, but I have pored
over the API docs and the relevant stuff in _Client-Server Programming
for OS/2 2.1_ with no luck. :-(

Thanks!

Joel

 * OLX 2.1 TD * The Robot Liberation Front strikes again!

--- WILDMAIL!/WC v4.12 
* Origin: For a better door menu, FREQ IRONOX and FICTFACT! (1:202/704.0)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 202/704 701 777 3615/50 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.