السيرفر 1
السيرفر 1
السيرفر 1
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;
namespace server
{
class Program
{
static void Main(string[] args)
{
Socket server = new
Socket(AddressFamily.InterNetwork ,SocketType.Stream ,ProtocolType.Tcp);
IPEndPoint eip = new IPEndPoint(IPAddress.Parse("127.0.0.1"),2000);
server.Bind(eip);
server.Listen(20);
Console.WriteLine("server is running ");
Socket s = server.Accept();
}
}
}