"comment envoyer un socket C#" Code Answer's
You're definitely familiar with the best coding language C# that developers use to develop their projects and they get all their queries like "comment envoyer un socket C#" answered properly. Developers are finding an appropriate answer about comment envoyer un socket C# related to the C# coding language. By visiting this online portal developers get answers concerning C# codes question like comment envoyer un socket C#. Enter your desired code related query in the search bar and get every piece of information about C# code related question on comment envoyer un socket C#.
comment envoyer un socket C#
// Establish the local endpoint for the socket.
IPHostEntry ipHost = Dns.GetHostEntry(Dns.GetHostName());
IPAddress ipAddr = ipHost.AddressList[0];
IPEndPoint ipEndPoint = new IPEndPoint(ipAddr, 11000);
// Create a TCP socket.
Socket client = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
// Connect the socket to the remote endpoint.
client.Connect(ipEndPoint);
// There is a text file test.txt located in the root directory.
string fileName = "C:\\test.txt";
// Send file fileName to remote device
Console.WriteLine("Sending {0} to the host.", fileName);
client.SendFile(fileName);
// Release the socket.
client.Shutdown(SocketShutdown.Both);
client.Close();
Source: docs.microsoft.com
All those coders who are working on the C# based application and are stuck on comment envoyer un socket C# can get a collection of related answers to their query. Programmers need to enter their query on comment envoyer un socket C# related to C# code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about comment envoyer un socket C# for the programmers working on C# code while coding their module. Coders are also allowed to rectify already present answers of comment envoyer un socket C# while working on the C# language code. Developers can add up suggestions if they deem fit any other answer relating to "comment envoyer un socket C#". Visit this developer's friendly online web community, CodeProZone, and get your queries like comment envoyer un socket C# resolved professionally and stay updated to the latest C# updates.