public FTPDataSocketManager(string userName, ushort port, int bufferSize = 10240) { _autoResetEvent = new AutoResetEvent(false); var option = SocketOptionBuilder.Instance .SetSocket() .UseIocp() .SetPort(port) .SetReadBufferSize(bufferSize) .SetWriteBufferSize(bufferSize) .Build(); var dataSocket = SocketFactory.CreateServerSocket(option); dataSocket.OnAccepted += DataSocket_OnAccepted; dataSocket.OnDisconnected += DataSocket_OnDisconnected; dataSocket.OnError += _serverSocket_OnError; dataSocket.OnReceive += DataSocket_OnReceive; _dataSocket = dataSocket; _userName = userName; _dataSocket.Start(); }
public void Start() { _serverSokcet.Start(); }
public void Start(int backlog = 10000) { serverSokcet.Start(backlog); }
internal void Start() { _server.Start(); }
public void Start() { _server.Start(); }
public void Start(int backlog = 10000) { _server.Start(backlog); }
public void SendData(byte[] data) { _dataSocket.Start(); _autoResetEvent1.WaitOne(); _dataSocket.SendAsync(_id, data); }
public void Start() { _serverSocket.Start(); }
public void Start(int backlog = 10 * 1000) { _serverSokcet.Start(backlog); _calcBegin = true; }