Documentation
¶
Overview ¶
Package termios implements the low level termios(3) terminal line discipline facilities.
For a higher level interface please use the github.com/pkg/term package.
Index ¶
- Constants
- func Cfgetispeed(attr *unix.Termios) uint32
- func Cfgetospeed(attr *unix.Termios) uint32
- func Cfmakecbreak(attr *unix.Termios)
- func Cfmakeraw(attr *unix.Termios)
- func Ptsname(fd uintptr) (string, error)
- func Pty() (*os.File, *os.File, error)
- func Tcdrain(fd uintptr) error
- func Tcflush(fd, which uintptr) error
- func Tcgetattr(fd uintptr, argp *unix.Termios) error
- func Tcsendbreak(fd, duration uintptr) error
- func Tcsetattr(fd, opt uintptr, argp *unix.Termios) error
- func Tiocinq(fd uintptr, argp *int) error
- func Tiocmbic(fd uintptr, status *int) error
- func Tiocmbis(fd uintptr, status *int) error
- func Tiocmget(fd uintptr, status *int) error
- func Tiocmset(fd uintptr, status *int) error
- func Tiocoutq(fd uintptr, argp *int) error
Constants ¶
const ( FREAD = 0x0001 FWRITE = 0x0002 IXON = 0x00000200 IXOFF = 0x00000400 IXANY = 0x00000800 CCTS_OFLOW = 0x00010000 CRTS_IFLOW = 0x00020000 CRTSCTS = CCTS_OFLOW | CRTS_IFLOW )
const ( TCIFLUSH = 0 TCOFLUSH = 1 TCIOFLUSH = 2 TCSANOW = 0 TCSADRAIN = 1 TCSAFLUSH = 2 )
Variables ¶
This section is empty.
Functions ¶
func Cfgetispeed ¶
Cfgetispeed returns the input baud rate stored in the termios structure.
func Cfgetospeed ¶
Cfgetospeed returns the output baud rate stored in the termios structure.
func Cfmakecbreak ¶
Cfmakecbreak modifies attr for cbreak mode.
func Pty ¶
Pty returns a UNIX 98 pseudoterminal device. Pty returns a pair of fds representing the master and slave pair.
func Tcdrain ¶
Tcdrain waits until all output written to the terminal referenced by fd has been transmitted to the terminal.
func Tcflush ¶
Tcflush discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of which.
func Tcsendbreak ¶
Tcsendbreak function transmits a continuous stream of zero-valued bits for four-tenths of a second to the terminal referenced by fildes. The duration parameter is ignored in this implementation.
Types ¶
This section is empty.