Socket is a Server-side socket
| 14 | |
| 15 | // Socket is a Server-side socket |
| 16 | type Socket interface { |
| 17 | ClientSocket |
| 18 | |
| 19 | // Join adds a Socket to the passed Room |
| 20 | Join(room string) |
| 21 | |
| 22 | // Leave removes a Socket from the passed Room |
| 23 | Leave(room string) |
| 24 | |
| 25 | // Rooms returns the rooms this Socket is in |
| 26 | Rooms() []string |
| 27 | |
| 28 | // To returns an Emitter to the passed room. |
| 29 | To(string) Emitter |
| 30 | |
| 31 | // Request returns the request which this Socket was created from. |
| 32 | Request() *http.Request |
| 33 | } |
| 34 | |
| 35 | type socket struct { |
| 36 | mu sync.RWMutex |