conn: document conn.ReadMessage

This commit is contained in:
Simon Ser 2024-07-08 23:16:14 +02:00
parent 07502541e4
commit bb234c8348

View file

@ -194,6 +194,10 @@ func (c *conn) Close() error {
return err
}
// Read reads an incoming message. It must be called from a single goroutine
// at a time.
//
// io.EOF is returned when there are no more messages to read.
func (c *conn) ReadMessage() (*irc.Message, error) {
msg, err := c.conn.ReadMessage()
if errors.Is(err, net.ErrClosed) {