static void Main(string[] args) { CDNServer server = new CDNServer(CDNNetWork.GetLocalIPPoint()); server.Start(); server.Idle(); Console.WriteLine(server); Console.ReadLine(); }
public CDNClientForm() { InitializeComponent(); server = new CDNClient(CDNNetWork.GetLocalIPPoint(), this); server.Start(); server.Idle(); this.localIpAddressControl.Value = server.LocalEndpoint as IPEndPoint; this.localIpAddressControl.ReadOnly = true; this.clientTreeView.Nodes.Add(server.localRoot); }
public void AddressUpdate(CDNNetWork sr) { switch (sr.type) { case CDNNetWork.CNDTYPE.CLIENT: client = new AddressAndPort(sr.LocalEndpoint); break; case CDNNetWork.CNDTYPE.CACHE: cache = new AddressAndPort(sr.LocalEndpoint); break; case CDNNetWork.CNDTYPE.SERVER: server = new AddressAndPort(sr.LocalEndpoint); break; default: break; } }