type cleanup

This commit is contained in:
Jeremy Latt 2014-02-08 23:15:05 -08:00
parent 20257ec624
commit a3b7441939
7 changed files with 91 additions and 48 deletions

View file

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