Torna al Thread

IPAddress ipAdd = IPAddress.Parse("127.0.0.1"); EndPoint ep = new IPEndPoint(ipAdd, 1234); Socket m_socListener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP); try { m_socListener.Connect(ep); if (m_socListener.Connected) { MessageBox.Show("CONNESSO"); int x = 1; byte[] byData = System.Text.Encoding.ASCII.GetBytes(Convert.ToString(x)); m_socListener.Send(byData); } } catch (SocketException se) { MessageBox.Show(se.Message); }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5