Address, ie.Port);
Console.WriteLine("The min port number is: {0}", IPEndPoint.MinPort);
Console.WriteLine("The max port number is: {0}
", IPEn
Tag: socket
C# Programmation Réseau: Créer un serveur NetworkStream
{
// Block here waiting for client connections
Socket newSocket = tcpl.AcceptSocket();
if (newSocket.Connected)
{
// cre
C# Programmation Réseau: Création de Socket avec UDP
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
public class MultiSend
{
public static void Main()
{
Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
IPEndPoint iep = new IPEndPoint(IPAddress.Parse("224.100.0.1"), 9050);
byte[] data = Encoding.ASCII.GetBytes("This is a test message");
server.SendTo(data, iep);
server.Close();
}
}
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: Client Udp
work,
SocketType.Dgram, ProtocolType.Udp);
string welcome = "Hello, are you there?";
data = Encoding.ASCII.GetBytes(welcome);
C# Programmation Réseau: Crypter les données à envoyé à travers les réseaux
atter = new SoapFormatter();
MemoryStream memstrm = new MemoryStream();
byte[] Key = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0
C# Programmation Réseau: Envoyer des données bianaires
35000.50;
emp2.EmployeeID = 2;
emp2.LastName = "B";
emp2.FirstName = "J";
emp2.YearsService = 9;
emp2.Salary = 23700.30;
T
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 d’un Socket UDP
Point)iep;
sock.Bind(iep);
sock.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership,
new MulticastOption(IPAddress.Pars