ITcpServerProvider.cs 678 B

1234567891011121314151617181920
  1. using System;
  2. namespace IFramework.Net.Tcp
  3. {
  4. public interface ITcpServerProvider : IDisposable
  5. {
  6. OnAcceptedHandler AcceptedCallback { get; set; }
  7. OnDisconnectedHandler DisconnectedCallback { get; set; }
  8. OnReceivedHandler ReceivedCallback { get; set; }
  9. OnReceivedSegmentHandler ReceivedOffsetCallback { get; set; }
  10. OnSentHandler SentCallback { get; set; }
  11. int NumberOfConnections { get; }
  12. void Close(SocketToken sToken);
  13. bool Start(int port, string ip = "0.0.0.0");
  14. void Stop();
  15. bool Send(SegmentToken segToken, bool waiting = true);
  16. int SendSync(SegmentToken segToken);
  17. }
  18. }