Skip to content

Commit

Permalink
Remove two unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken committed Mar 10, 2023
1 parent 865cb91 commit a7fd756
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,30 +472,6 @@ func (c *Connection) setDeadline(t time.Time) error {
return con.SetDeadline(t)
}

// setReadDeadline is a wrapper to type assert Connection.conn and set an I/O
// deadline in the underlying TCP connection socket, by calling
// net.Conn.SetReadDeadline(). It returns an error, in case the type assertion
// fails, although this should never happen.
func (c *Connection) setReadDeadline(t time.Time) error {
con, ok := c.conn.(net.Conn)
if !ok {
return errInvalidTypeAssertion
}
return con.SetReadDeadline(t)
}

// setWriteDeadline is a wrapper to type assert Connection.conn and set an I/O
// deadline in the underlying TCP connection socket, by calling
// net.Conn.WriteSetDeadline(). It returns an error, in case the type assertion
// fails, although this should never happen.
func (c *Connection) setWriteDeadline(t time.Time) error {
con, ok := c.conn.(net.Conn)
if !ok {
return errInvalidTypeAssertion
}
return con.SetWriteDeadline(t)
}

func (c *Connection) send(f frame) error {
if c.IsClosed() {
return ErrClosed
Expand Down

0 comments on commit a7fd756

Please sign in to comment.