Пример #1
0
    /// <summary>
    /// 获取到服务器分配的conv
    /// </summary>
    /// <param name="conv"></param>
    public void OnGetConv(uint conv)
    {
        Debug.Log("On Get Conv");
        kcpSession.SetConv(conv);

        kcpSession.Begin();
    }
Пример #2
0
    /// <summary>
    /// 新客户端连接
    /// </summary>
    /// <param name="conv"></param>
    void NewConv(uint conv)
    {
        KcpSession kcpSession = new KcpSession();

        kcpSession.SetConv(conv);
        kcpSession.Begin();

        kcpSesstionDic[conv] = kcpSession;
    }