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:
khlieng 2015-01-30 00:38:51 +01:00
parent 5c6c43e017
commit 3c02b00303
18 changed files with 268 additions and 53 deletions

View file

@ -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)
}
}