3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

use a buffered channel for socket writing

This commit is contained in:
Jeremy Latt 2014-02-18 17:36:06 -08:00
parent 0cd6be8008
commit dcb4ac90e2

View File

@ -26,8 +26,8 @@ func NewSocket(conn net.Conn) *Socket {
conn: conn,
done: make(chan bool),
reader: bufio.NewReader(conn),
receive: make(chan string),
send: make(chan string),
receive: make(chan string, 16),
send: make(chan string, 16),
writer: bufio.NewWriter(conn),
}