Example #1
0
 private static void SocketDispose(C4Socket *socket)
 {
     try {
         _externalDispose?.Invoke(socket);
     } catch (Exception e) {
         _error?.Invoke(socket, new Exception("Error disposing socket", e));
     }
 }
 private static void SocketOpened(C4Socket *socket, C4Address *address, C4Slice options)
 {
     try {
         _externalOpen?.Invoke(socket, address, options);
     } catch (Exception e) {
         _error?.Invoke(socket, new Exception("Error opening to socket", e));
         Native.c4socket_closed(socket, new C4Error(C4ErrorCode.UnexpectedError));
     }
 }
Example #3
0
 private static void SocketRequestClose(C4Socket *socket, int status, FLSlice message)
 {
     try {
         _externalRequestClose?.Invoke(socket, status, message.CreateString());
     } catch (Exception e) {
         _error?.Invoke(socket, new Exception("Error requesting socket close", e));
     }
 }