button = FindViewById<Button>(Resource.Id.button1); button.Click += delegate { string textToSend = "hi"; //---create a TCPClient object at the IP and port no.--- TcpClient client = new TcpClient("192.168.1.8", 5555); NetworkStream nwStream = client.GetStream(); byte[] bytesToSend = ASCIIEncoding.ASCII.GetBytes(textToSend); //---send the text--- nwStream.Write(bytesToSend, 0, bytesToSend.Length); //---read back the text--- client.Close(); nwStream.Close(); };
10/21/2018 2:29:43 PM
wail1 Answer
New AnswerLearn Playing. Play Learning
SoloLearn Inc.
Send us a message