Siemens V4.0 manual LM named pipes

Models: V4.0

1 365
Download 365 pages 46.33 Kb
Page 18
Image 18

Introduction to Advanced Server for UNIX

Shared resources

2.2.6.1LM named pipes

Advanced Server for UNIX also provides LM named pipes. They are bidirectional commu- nication channels for interprocess communication in the network. They differ from UNIX® named pipes.

The following example describes the basic procedure for setting up and clearing down an LM named pipe: An application process with root authorization creates a named pipe on the server. The client process on the client sets up a connection to the known named pipe over the local network. Both processes can then exchange data using the LM named pipe. When the data exchange has ended, the LM named pipe is deleted.

i

Advanced Server for UNIX must be running in order to use LM named pipes.

Example

The root-authorized process on the server server1 creates a LM named pipe with the name srvp using the function DosMakeNmPipe (“/PIPE/srvp” , &reference,...) and waits using the function DosConnectNmPipe (reference) for a connection to be set up (_dos_open) to the client process.

The client process – under MS-DOS, OS/2, Windows, Windows for Workgroups, Windows NT or Windows 95/98 – opens the named pipe with

_dos_open ("\\\\server1\\PIPE\\srvp",&cfd,...), and data can now be exchanged between the processes.

i

The character “\” must always be specified twice in a C program since the first “\” is interpreted as an escape character.

The connection to the LM named pipe is set up using the resource IPC$. If a client process on a client wishes to communicate with an application process on the server, this resource is connected automatically.

If the LM named pipe is to be closed again after the data exchange, the client process clo- ses this named pipe using _dos_close(cfd).

The server process can then clear down the connection using DosDisconnectNmPipe(reference) and delete the named pipe using DosClose(reference).

Further information on LM named pipes can be found in the manual “API Reference” and in the manual pages for the API.

Product Manual

U7613-J-Z815-6-76

Page 18
Image 18
Siemens V4.0 manual LM named pipes