edelib 2.1.0
Public Member Functions | List of all members
PTY Class Reference

emulate pty api More...

#include <edelib/Pty.h>

Public Member Functions

 PTY ()
 
 ~PTY ()
 
int getpt ()
 
int grantpt ()
 
int unlockpt ()
 
const char * ptsname ()
 

Detailed Description

emulate pty api

PTY compatibility routines. This class tries to emulate a UNIX98 PTY API on various platforms.

Constructor & Destructor Documentation

◆ PTY()

PTY ( )

Construct a PTY object

◆ ~PTY()

~PTY ( )

Destructs the object. The PTY is closed if it is still open

Member Function Documentation

◆ getpt()

int getpt ( )

Allocate a pty

Returns
A filedescriptor to the master side

◆ grantpt()

int grantpt ( )

Grant access to the slave side

Returns
zero if succesfull, < 0 otherwise

◆ ptsname()

const char * ptsname ( )

Return the slave side name

◆ unlockpt()

int unlockpt ( )

Unlock the pty. This allows connections on the slave side.

Returns
Zero if successful, < 0 otherwise

The documentation for this class was generated from the following file: