async hostname lookups

This commit is contained in:
Jeremy Latt
2014-02-20 11:51:45 -08:00
parent c0dc733351
commit 97881b555d
2 changed files with 23 additions and 7 deletions
+2 -2
View File
@@ -33,14 +33,14 @@ type Client struct {
username string
}
func NewClient(server *Server, conn net.Conn) *Client {
func NewClient(server *Server, conn net.Conn, hostname string) *Client {
now := time.Now()
client := &Client{
atime: now,
channels: make(ChannelSet),
ctime: now,
flags: make(map[UserMode]bool),
hostname: AddrLookupHostname(conn.RemoteAddr()),
hostname: hostname,
phase: server.InitPhase(),
server: server,
socket: NewSocket(conn),