IWSServerProvider.cs 639 B

12345678910111213141516171819
  1. using System;
  2. namespace IFramework.Net.WebSocket
  3. {
  4. public interface IWSServerProvider:IDisposable
  5. {
  6. OnAcceptedHandler OnAccepted { get; set; }
  7. OnDisconnectedHandler OnDisconnected { get; set; }
  8. OnReceivedHandler OnReceived { get; set; }
  9. OnReceivedSegmentHandler OnReceivedBytes { get; set; }
  10. OnSentHandler OnSent { get; set; }
  11. void Close(SocketToken sToken);
  12. bool Send(SegmentToken session, bool waiting = true);
  13. bool Send(SocketToken sToken, string content, bool waiting = true);
  14. bool Start(int port, string ip = "0.0.0.0");
  15. void Stop();
  16. }
  17. }