Exemplo n.º 1
0
        static void Main(string[] args)
        {
            CDNServer server = new CDNServer(CDNNetWork.GetLocalIPPoint());

            server.Start();
            server.Idle();
            Console.WriteLine(server);
            Console.ReadLine();
        }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
        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;
            }
        }