= (string)DNSserverKey.GetValue("NameServer");
Console.WriteLine("DNS Servers: {0}", serverlist);
DNSserverKey.Close();
start.Close();
Tag: list
C# Programmation Réseau: Analyse d’adresse IP
if (IPAddress.IsLoopback(test2))
Console.WriteLine("The Loopback address is: {0}", test2.ToString());
else
Console.WriteL
C# Programmation Réseau: Trouver un Serveur par son nom
using System;
using System.Net;
class AddressSample {
public static void Main() {
IPHostEntry ihe = Dns.GetHostByName(Dns.GetHostName());
IPAddress myself = ihe.AddressList[0];
Console.WriteLine("The NONE address is: {0}",myself);
}
}
C# Programmation Réseau: Exemple d’une application qui accède aux routeurs CISCO
Router()
{
Text = "Cisco Router Utilization";
Size = new Size(400, 380);
Label label1 = new Label();
label1.Parent = this;
lab
C# Programmation Réseau: Résolution de nom de domaine
using System;
using System.Net;
public class DNSNameResolution
{
[STAThread]
static void Main(string[] args)
{
IPHostEntry MyHost = Dns.Resolve(args[0]);
foreach (IPAddress MyIP in MyHost.AddressList)
{
Console.WriteLine(MyIP.Address);
}
}
}
C# Programmation Réseau: Afficher l’adresse IP de l’ordinateur
ns of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary for
C# Programmation Réseau: Déterminer le nom de domaine qui est associé à une adresse IP donnée
ddress in ipHostEntry.AddressList) {
Console.WriteLine("Address: {0}", address.ToString());
}
Console.ReadLine();
}
static
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: Trouver la liste des hôtes
using System;
using System.Net;
class MainClass {
public static void Main(string[] args) {
foreach (string comp in args) {
try {
IPAddress[] addresses = Dns.GetHostEntry(comp).AddressList;
foreach (IPAddress address in addresses) {
Console.WriteLine("{0} = {1} ({2})",
comp, address, address.AddressFamily);
}
} catch (Exception ex) {
Console.WriteLine("{0} = Error ({1})", comp, ex.Message);
}
}
}
}
C# Programmation Réseau: Créer un serveur NetworkStream
{
// Block here waiting for client connections
Socket newSocket = tcpl.AcceptSocket();
if (newSocket.Connected)
{
// cre