IRC output gets queued until RPL_WELCOME, added tcp timeouts and error handling, store selected tab in localStorage, more design work, upgraded to lodash 3.0.0
This commit is contained in:
parent
5c6c43e017
commit
3c02b00303
18 changed files with 268 additions and 53 deletions
|
@ -7,18 +7,18 @@ import (
|
|||
type WebSocket struct {
|
||||
conn *websocket.Conn
|
||||
|
||||
In chan []byte
|
||||
Out chan []byte
|
||||
}
|
||||
|
||||
func NewWebSocket(ws *websocket.Conn) *WebSocket {
|
||||
return &WebSocket{
|
||||
conn: ws,
|
||||
In: make(chan []byte, 32),
|
||||
Out: make(chan []byte, 32),
|
||||
}
|
||||
}
|
||||
|
||||
func (w *WebSocket) write() {
|
||||
for data := range w.In {
|
||||
for data := range w.Out {
|
||||
w.conn.Write(data)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue