forked from External/ergo
type cleanup
This commit is contained in:
parent
20257ec624
commit
a3b7441939
7 changed files with 91 additions and 48 deletions
|
|
@ -23,8 +23,6 @@ type Client struct {
|
|||
username string
|
||||
}
|
||||
|
||||
type ClientSet map[*Client]bool
|
||||
|
||||
func NewClient(server *Server, conn net.Conn) *Client {
|
||||
read := StringReadChan(conn)
|
||||
write := StringWriteChan(conn)
|
||||
|
|
@ -73,6 +71,7 @@ func (c *Client) writeConn(write chan<- string, replies <-chan Reply) {
|
|||
|
||||
func (client *Client) Destroy() *Client {
|
||||
client.conn.Close()
|
||||
close(client.replies)
|
||||
return client
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue