int)iep;
Console.WriteLine(“Ready to receive…”);
byte[] data = new byte[1024];
int recv = sock.ReceiveFrom(data, ref ep);
string stri
Author: Exemple, Cours et Tutoriels C#
C# Programmation Réseau: Créer une connexion Socket
ent();
MyClient.Connect(“http://www.java2s.com”, 10000);
NetworkStream MyNetStream = MyClient.GetStream();
if(MyNetStream.CanWrite &&
C# Programmation Réseau: Crypter une chaîne de caractère
6, 0x07, 0x08, 0x09,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16};
byte[] IV = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
C# Programmation Réseau: Sélectionner un client TCP
byte[] data = new byte[1024];
string stringData;
int recv;
sock.Connect(iep);
Console.WriteLine(“Connected to server”);
recv
C# Programmation Réseau: Créer un serveur qui accepte plusieurs connexions
g())
{
Thread.Sleep(1000);
}
ConnectionThread newconnection = new ConnectionThread();
newconnection.threadListe
C# Programmation Réseau: Exécuter une requête POST d’un serveur HTTP
;
request.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallback), request);
allDone.WaitOne();
}
private static void GetRequ
C# Programmation Réseau: Vérifier si un URL est ROOT
ftware is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all co
C# Programmation Réseau: Vérifiersi l’adresse IP est une boucle
using System;
using System.Net;
class AddressSample {
public static void Main() {
IPAddress test2 = IPAddress.Loopback;
if (IPAddress.IsLoopback(test2))
Console.WriteLine(…
C# Programmation Réseau: Créer une application de chat avec une socket MulticastSocket
()
{
Text = “Multicast Chat Program”;
Size = new Size(400, 380);
Label label1 = new Label();
label1.Parent = this;
label1.Text
C# Programmation Réseau: Exemple d’utilisationde la classe Uri
);
Console.WriteLine(“Local Path: ” + sample.LocalPath);
Console.WriteLine(“Query: ” + sample.Query);
Console.WriteLine(“Path and queury: ” + sam