Exemplo n.º 1
0
func (this *Callback) OnConnect(c *gotcp.Conn) bool {
	addr := c.GetRawConn().RemoteAddr()
	c.PutExtraData(addr.String())
	//str := addr.String()
	/* act on str */
	this.cm.AddConn(addr.String(), c)

	log.Println("OnConnect:", addr)
	return true
}