Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            UDPThread     udp  = new UDPThread(7777);
            MsgTranslator tran = new MsgTranslator(udp);

            tran.MessageReceived += tran_MessageReceived;
        }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            UDPThread client = new UDPThread(textBox1.Text, 6666);

            tan = new MsgTranslator(client);
            tan.MessageReceived += MessageReceived;
            tan.DebugEvent      += Debug;
        }
Ejemplo n.º 3
0
        public Form1()
        {
            log = new LogInfo("log.txt");
            InitializeComponent();
            UDPThread client = new UDPThread(6666);

            tan = new MsgTranslator(client);
            tan.MessageReceived += MessageReceived;
            tan.DebugEvent      += Debug;
        }
Ejemplo n.º 4
0
        public Form1()
        {
            InitializeComponent();
            Config cfg = SeiClient.GetDefaultConfig();

            cfg.Port = 7777;
            UDPThread udp = new UDPThread(cfg);

            tran = new MsgTranslator(udp, cfg);
            tran.MessageReceived += tran_MessageReceived;
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            UDPThread     udp  = new UDPThread("58.198.176.217", 7777);
            MsgTranslator tran = new MsgTranslator(udp);

            tran.MessageReceived += tran_MessageReceived;
            IPEndPoint remote = new IPEndPoint(IPAddress.Any, 7777);
            Msg        m      = new Msg(remote, "zz", "zhujun", Commands.Join, "test1", "test2");

            m.PackageNo = 12345678;
            tran.Send(m);
        }