public ChatClient(UdpChannelManager channelmanager, ChannelidType channelid) : base(channelmanager, channelid) { unreliabledatareceiveddelegate += unreliabledatareceivedcallback; reliabledatareceiveddelegate += reliabledatareceivedcallback; proxyclients_list = new List <ChatClient>(); SetTimer(); }
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); } }