public Connection(Server server, Socket acceptSocket) { conId = System.Threading.Interlocked.Increment(ref Connection.idpool); Socket = acceptSocket; serverRef = server; IPEndPoint ipEndPoint = acceptSocket.RemoteEndPoint as IPEndPoint; this.endPointIP = ipEndPoint.Address; }
public static void Main(string[] args) { ushort port = 8010; Console.WriteLine("Creating 2000 initial client server with receive buffer size of 4096"); Console.WriteLine("Creating 20 Accept Args"); IPEndPoint server_ep = new IPEndPoint(IPAddress.Any, port); var userserver = new Thixi.Server(2000, 4096, 20); Console.WriteLine("Setting delegated OnNewConnection"); userserver.OnNewConnection = OnNewUserConnection; Console.WriteLine("Starting TCP Server with NoDelay option set on port "+port); userserver.Start(server_ep, SocketOptionName.NoDelay); Console.ReadLine (); }
public static void Main(string[] args) { ushort port = 8010; Console.WriteLine("Creating 2000 initial client server with receive buffer size of 4096"); Console.WriteLine("Creating 20 Accept Args"); IPEndPoint server_ep = new IPEndPoint(IPAddress.Any, port); var userserver = new Thixi.Server(2000, 4096, 20); Console.WriteLine("Setting delegated OnNewConnection"); userserver.OnNewConnection = OnNewUserConnection; Console.WriteLine("Starting TCP Server with NoDelay option set on port " + port); userserver.Start(server_ep, SocketOptionName.NoDelay); Console.ReadLine(); }
public HttpConnection(Thixi.Server serv, Socket socket) : base(serv, socket) { }
public SocketAsyncEventArgsPool(Server serverRef) { this.serverRef = serverRef; }
static Thixi.Connection OnNewUserConnection(Thixi.Server serv, Socket socket) { var newconn = new HttpConnection(serv, socket); return(newconn); }
public virtual void RefDispose() { serverRef = null; endPointIP = null; }