Features >

 

Programming

 

 

Pragma TelnetServer has implemented means for third party developers to send data directly to the client without having to write the application to be totally aware of the emulation. This is helpful for sending beeps, printing jobs, or any other information that needs to be transferred without interpretation by the server.

Since a ssh session is entirely encrypted, data cannot be sent directly to the client. All data must go through the server so that it can be encrypted, then decrypted by the client. The named pipe allows the server to collect the data from the application, encrypt it and pass it to the client.

Using Named Pipes

Named pipes can be used to write data to the server, which is then passed to the client. This method allows the application to pass any raw data directly to the client no matter what the protocol of the server. The server will handle all of the network communication to pass the data to the client.

To get the named pipe, use the environment variable PRAGMASYS_CMDSERVER_PID to get the process id of the cmdserver.exe process for the session. Using the cmdserver process id allows applications to continue to work even if a session is reconnected.

Using the cmdserver process id, build the named pipe handle in the format:

\\\\.\\pipe\\PragmaServerPipe%PRAGMASYS_CMDSERVER_PID%

Use the appropriate OpenPipe call to get a handle to the pipe. Keep in mind to close the pipe after writing all necessary data.

There are examples of programming with the named pipes in the Examples directory of the installation folder.

See Also:

Beeping

 

 

Copyright © 2023 Pragma Systems Inc