void sendPackets()
{
Socket sock = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp);
sock.SetSo
Tag: set
C# Programmation Réseau: Exemple d’un Serveur de diffusion avec le protocole UDP
oding.ASCII.GetBytes(hostname);
sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);
sock.SendTo(data, iep1);
sock.
C# Programmation Réseau: Exemple d’une Application de Tchat avec le protocole TCP/IP
];
public NewTcpChat()
{
Text = “New TCP Chat Program”;
Size = new Size(400, 380);
Label label1 = new Label();
label1.Pare
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: 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’une application Traceroute pour suivre les chemins d’un paquet
IPEndPoint iep = new IPEndPoint(iphe.AddressList[0], 0);
EndPoint ep = (EndPoint)iep;
ICMP packet = new ICMP();
packet.Type = 0x08;
C# Programmation Réseau: Trouver un Serveur DNS
= (string)DNSserverKey.GetValue("NameServer");
Console.WriteLine("DNS Servers: {0}", serverlist);
DNSserverKey.Close();
start.Close();
C# Programmation Réseau: Créer une application SNMP
MP information:");
// Send sysName SNMP request
response = conn.get("get", argv[0], argv[1], "1.3.6.1.2.1.1.5.0");
if (response[0] == 0xff)
C# Programmation Réseau: Crypter les données dans une communication de Socket
emoryStream();
byte[] Key = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16};
b
C# Programmation Réseau: Lire les données d’un Socket UDP
Point)iep;
sock.Bind(iep);
sock.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership,
new MulticastOption(IPAddress.Pars