public UserToken(SocketServer s, AbsHandlerCenter center) { server = s; handlerCenter = center; IsUsing = false; ReceiceSAEA = new SocketAsyncEventArgs(); ReceiceSAEA.Completed += ReceiceCompleted; ReceiceSAEA.SetBuffer(new byte[1024], 0, 1024); ReceiceSAEA.UserToken = this; SendSAEAQueue = new Queue <SocketAsyncEventArgs>(); }
public SocketServer(AbsHandlerCenter center) { handlerCenter = center; server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); }