public bool CreateAndSetChannel(string name, string ip, int port, int maxlength) { if (HasNetworkChannel(name)) { return(false); } NetworkChannel newChannel = new NetworkChannel(); newChannel.Name = name; newChannel.HostOrIPString = ip; newChannel.Port = port; newChannel.MaxPacketLength = maxlength; newChannel.SetNetworkChannel(CreateNetworkChannel(name)); newChannel.HeartBeatInterval = 100000; m_NetworkChannels.Add(newChannel); return(true); }