Creating a WiFi Application

I need to write an application that shares data over a wireless network.

And I have no idea how to do this. I'm good in C #, so I'm going to choose C # to write the application

First question: how to read data received via Wi-Fi or how to send data via Wi-Fi ... Is there any port that I have to read / write to?

Second question. All protocol controls are performed by the adapter or my application if?

And also suggest some readings I should go for! I read the basics of WiFi and how it works, and that’s it!

Hello!

+3
source share
2 answers

Wi-Fi Windows XP SP3/Win2k/Vista/7.

+1

1. / .

            public void get_data_from_server()
                    {
                        try
                        {
                            while (true)
                        {

                                byte[] b = new byte[1024];
                                int r = SocClient.Receive(b);
                                if (r > 0)
                                {
                                    this.Invoke((MethodInvoker)delegate
                                    {
                                        listBoxclient.Items.Add(Encoding.Unicode.GetString(b, 0, r));
                                        sock.Text = "socket_client == Connected";
                                        sock.ForeColor = Color.Green;
                                    });
                                }

                            Thread.Sleep(400);
                            }


                        }
                        catch
                        {

                            ;


                        }
                    }

                private void sending_client_to_server()
                    {
                        try
                        {
                            while (true)
                            {
                                string datetime = gettime();
                               string ipee =get_ip_address();
                                byte[] b = Encoding.Unicode.GetBytes(ipee + " : " + "5050" + "  " + datetime);
                                SocClient.Send(b);
                                delay();
                                Thread.Sleep(400);
                            }
                        }
                        catch
                        {
                            ;
                        }
                    }

2. TCP UDP .

3. #

0

Source: https://habr.com/ru/post/1781403/


All Articles