Example #1
0
    static void Main(string[] args)
    {
        System.Console.WriteLine("Start Udp Client ...");

        PGN.Udp    pNet = new PGN.Udp(PGN.NTC.DNF_CLIENT);
        PGN.Packet pPck = new PGN.Packet();

        pNet.Create("127.0.0.1", 20000);

        int c = 0;

        int op = PGN.NTC.OP_CHAT;

        //string str = "ABCDEF HIJK: " + c;


        while (true)
        {
            ++c;
            Thread.Sleep(1000);

            string str = "Send Mesage: Hello world: " + c;
            pNet.SendTo(str, op);
        }

        pNet.Destroy();
    }
Example #2
0
    static void Main(string[] args)
    {
        System.Console.WriteLine("Start Udp Server ...");

        PGN.Udp pNet = new PGN.Udp(PGN.NTC.DNF_SERVER);

        pNet.Create("127.0.0.1", 20000);


        int c = 0;

        while (true)
        {
            ++c;
            Thread.Sleep(1000);
        }
    }