diff --git a/serial_linux.go b/serial_linux.go index 65420f3..9a6d2d4 100644 --- a/serial_linux.go +++ b/serial_linux.go @@ -5,6 +5,7 @@ package serial import ( "fmt" "os" + "syscall" "time" "unsafe" @@ -142,6 +143,22 @@ func (p *Port) Write(b []byte) (n int, err error) { return p.f.Write(b) } +func (p *Port) SetWriteDeadline(t time.Time) (err error) { + return p.f.SetWriteDeadline(t) +} + +func (p *Port) SetDeadline(t time.Time) (err error) { + return p.f.SetDeadline(t) +} + +func (p *Port) SetReadDeadline(t time.Time) (err error) { + return p.f.SetReadDeadline(t) +} + +func (p *Port) SyscallConn() (syscall.RawConn, error) { + return p.f.SyscallConn() +} + // Discards data written to the port but not transmitted, // or data received but not read func (p *Port) Flush() error {