Exemple #1
0
    // -- 业务处理 --

    // -- Client to Server --

    /// <summary>
    /// 发送登录认证
    /// </summary>
    public void SendAuthReq()
    {
        Show("客户端请求认证");

        Msg.C2G.AuthReq pack = new Msg.C2G.AuthReq();
        m_Netter.Send <Msg.C2G.AuthReq>((int)Msg.C2G.CMD.AuthReq, pack);
    }
Exemple #2
0
    public void SendMessageRsp(uint clientId, string message)
    {
        Show(string.Format("SendTo {1}:{0}", message, clientId));
        Msg.G2C.SMESSAGERsp respond = new Msg.G2C.SMESSAGERsp();
        respond.ClientMessage = message;
        ClientNetter client = m_Netter.GetClient(clientId);

        client.Send <Msg.G2C.SMESSAGERsp>(((int)Msg.G2C.CMD.SmessageRsp), respond);
    }
Exemple #3
0
    // -- Server to Client --
    public void SendAuthRsp(uint clientId)
    {
        Show("客户端认证通过:" + clientId);

        Msg.G2C.AuthRsp msg = new Msg.G2C.AuthRsp();
        msg.UserId = clientId;
        ClientNetter client = m_Netter.GetClient(clientId);

        client.Send <Msg.G2C.AuthRsp>(((int)Msg.G2C.CMD.AuthRsp), msg);
    }