コード例 #1
0
 public ChatClient(UdpChannelManager channelmanager, ChannelidType channelid) : base(channelmanager, channelid)
 {
     unreliabledatareceiveddelegate += unreliabledatareceivedcallback;
     reliabledatareceiveddelegate   += reliabledatareceivedcallback;
     proxyclients_list = new List <ChatClient>();
     SetTimer();
 }
コード例 #2
0
        public UdpChannel(UdpChannelManager channelmanager, ChannelidType channelid)
        {
            mchannelmanager = channelmanager;
            mchannelid      = channelid;
            bool bcontain = channelmanager.OnchannelReceivedatacallbackmap.ContainsKey(channelid);

            if (bcontain)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("warning  channel id already exist");
                Console.ResetColor();
            }
            else
            {
                channelmanager.OnchannelReceivedatacallbackmap.Add(channelid, this);
            }
        }