mirror of
https://github.com/ergochat/ergo.git
synced 2025-01-03 08:32:43 +01:00
use a buffered channel for socket writing
This commit is contained in:
parent
0cd6be8008
commit
dcb4ac90e2
@ -26,8 +26,8 @@ func NewSocket(conn net.Conn) *Socket {
|
|||||||
conn: conn,
|
conn: conn,
|
||||||
done: make(chan bool),
|
done: make(chan bool),
|
||||||
reader: bufio.NewReader(conn),
|
reader: bufio.NewReader(conn),
|
||||||
receive: make(chan string),
|
receive: make(chan string, 16),
|
||||||
send: make(chan string),
|
send: make(chan string, 16),
|
||||||
writer: bufio.NewWriter(conn),
|
writer: bufio.NewWriter(conn),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user