示例#1
0
func (svc *UpdateService) NewClient(conn *server.Connection, service int) server.Client {
	conn.Log().Info("new update client")
	conn.Write <- new(protocol.OutboundUpdateHandshake)
	return NewUpdateClient(conn, svc)
}
示例#2
0
文件: game_service.go 项目: gemrs/gem
func (svc *GameService) NewClient(conn *server.Connection, service int) server.Client {
	conn.Log().Info("new game client")
	client := playerimpl.NewPlayer(conn, svc.world)
	client.SetDecodeFunc(svc.handshake)
	return client
}