GetContext returns the Iris Context from a websocket connection. Note that writing to the client connection through this Context is not allowed from a websocket event because the connection is hijacked. If used, you are limited for read-only access of the request e.g. read the request headers.
(c *neffos.Conn)
| 219 | // from a websocket event because the connection is hijacked. |
| 220 | // If used, you are limited for read-only access of the request e.g. read the request headers. |
| 221 | func GetContext(c *neffos.Conn) *context.Context { |
| 222 | if sw, ok := c.Socket().(*socketWrapper); ok { |
| 223 | return sw.ctx |
| 224 | } |
| 225 | return nil |
| 226 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…