123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- using System.Net.Sockets;
- namespace NetCoreServer
- {
-
-
-
- public interface IWebSocket
- {
-
-
-
-
-
- void OnWsConnecting(HttpRequest request) {}
-
-
-
-
- void OnWsConnected(HttpResponse response) {}
-
-
-
-
-
-
-
- bool OnWsConnecting(HttpRequest request, HttpResponse response) { return true; }
-
-
-
-
- void OnWsConnected(HttpRequest request) {}
-
-
-
- void OnWsDisconnecting() {}
-
-
-
- void OnWsDisconnected() {}
-
-
-
-
-
-
- void OnWsReceived(byte[] buffer, long offset, long size) {}
-
-
-
-
-
-
-
- void OnWsClose(byte[] buffer, long offset, long size, int status = 1000) {}
-
-
-
-
-
-
- void OnWsPing(byte[] buffer, long offset, long size) {}
-
-
-
-
-
-
- void OnWsPong(byte[] buffer, long offset, long size) {}
-
-
-
-
- void OnWsError(string error) {}
-
-
-
-
- void OnWsError(SocketError error) {}
-
-
-
-
- void SendUpgrade(HttpResponse response) {}
- }
- }
|