emoryStream();
byte[] Key = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16};
b
Tag: list
C# Programmation Réseau: Obtenir l’adresse IP de l’hôte
ons of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary fo
C# Programmation Réseau: Créer un Socket d’écoute
yListener = new TcpListener(PortNumber);
MyListener.Start();
//Console.WriteLine("Waiting For Connection");
TcpClient MyClient = MyListener.
C# Programmation Réseau: Lire les données binaires
ient.GetStream();
IFormatter formatter = new BinaryFormatter();
SerialEmployee emp1 = (SerialEmployee)formatter.Deserialize(strm);
Console.Wr
C# Programmation Réseau: Trouver les serveurs DNS dans le registre
= (string)DNSserverKey.GetValue("NameServer");
Console.WriteLine("DNS Servers: {0}", serverlist);
DNSserverKey.Close();
start.Close();
C# Programmation Réseau: Accepter une demande de connexion en attente
rver.AcceptTcpClient();
NetworkStream stream = client.GetStream();
int i = stream.Read(bytes, 0, bytes.Length);
C# Programmation Réseau: Obtenir le nom et l’adresse de l’hôte
using System;
using System.Net;
public class DNSName
{
public static void Main()
{
string hostName = Dns.GetHostName();
Console.WriteLine("Local hostname: {0}", hostName);
IPHostEntry myself = Dns.GetHostByName(hostName);
foreach (IPAddress address in myself.AddressList)
{
Console.WriteLine("IP Address: {0}", address.ToString());
}
}
}
C# Programmation Réseau: Exemple d’un application Serveur TCP
total += sent;
dataleft -= sent;
}
return total;
}
private static byte[] ReceiveData(Socket s, int size)
{
int total = 0
C# Programmation Réseau: Obtenir l’adresse mac de l’ordinateur
onse = new byte[1024];
nextmib = mib;
while (true)
{
response = conn.get("getnext", argv[0], argv[1], nextmib);
commlength
C# Programmation Réseau: Serveur TCP Asynchrone
ynchronous TCP Server";
Size = new Size(400, 380);
results = new ListBox();
results.Parent = this;
results.Location = new Point(10, 65)