(conn *websocket.Conn, userID uint, token string, onClose func(*client))
| 30 | } |
| 31 | |
| 32 | func newClient(conn *websocket.Conn, userID uint, token string, onClose func(*client)) *client { |
| 33 | return &client{ |
| 34 | conn: conn, |
| 35 | write: make(chan *model.MessageExternal, 1), |
| 36 | userID: userID, |
| 37 | token: token, |
| 38 | onClose: onClose, |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | // Close closes the connection. |
| 43 | func (c *client) Close() { |
no outgoing calls
no test coverage detected
searching dependent graphs…