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();
Also in C#:
- open udp socket c#
- c# make http request
- unity get child
- C# array to label
- reference to gameobject in different scene unity
- transform.translate unity
- C# graph api upload file one drive
- console application in c# ms crm
- progress openedge odbc connection string c#
- c sharp string interpolation
- jumping with character controller unity
- unity line renderer position count
- draw sphere cast unity with program
- uwp file open picker
- get user directory of file in c#
- how to open new form on button click in c# xamarin
- how to reduce garbage collection c#
- how to make error sound c#
- lat long data type c#
- download and run exe c# 1 button
- iterate through dictionary c#
- linq in c#
- c# switct case
- C# Cast double to float