static void Main(string[] args) { var server = SocketServerBuilder.Create() .ListensOn(IPAddress.Any) .UsingPort(1337) //.WithComponent(new BasicTelnetComponent()) // sends IAC WONT ECHO etc. //.WithComponent(new ChatServerComponent()) // very basic .WithComponent(new AsciiMovieServerComponent()) .Build(); server.StartConsole(); }
static void Main(string[] args) { string host = "127.0.0.1"; int port = 6000; IPAddress ip = IPAddress.Parse(host); IPEndPoint ipe = new IPEndPoint(ip, port); SocketServer server = new SocketServerBuilder() .WithMassageHandle <MassageHandle>() .WithHost("0.0.0.0") .SetMaxConnections(1000) .SetReceiveBufferSize(32 * 1024) .SetPort(6606) .Build(); server.StartListen(); while (true) { Thread.Sleep(100); //Application.DoEvents(); } }