recieve

Mar 12, 2012 at 1:07pm
hi,
where should i put this code in a windows form application using c#.im writing tic tac toe online i tried many spots to write this code but it doesnt work
1
2
3
4
5
6
7
8
9
10
11
12
13
            UdpClient udps = new UdpClient(10001);
            IPEndPoint ipep = null;
            while (true)
            {
                
                byte[] bindata = udps.Receive(ref ipep);
                string data = Encoding.ASCII.GetString(bindata);
                Console.WriteLine(data);
                byte[] binhavij= udps.Receive(ref ipep);
                string havij=Encoding.ASCII.GetString(binhavij);
                if(data=="O" && havij==,3)
                button3.Text="O":
                
Mar 12, 2012 at 2:03pm
Put it in the MSDN Forums, in a subforum dedicated to C#, along with the description of your project and what that code is supposed to do and when.
Topic archived. No new replies allowed.