c4socket_closed

Function c4socket_closed 

Source
pub unsafe extern "C" fn c4socket_closed(
    socket: *mut C4Socket,
    errorIfAny: C4Error,
)
Expand description

Notifies LiteCore that a socket has finished closing, or disconnected, or failed to open.

  • If this is a normal close in response to a C4SocketFactory.close request, the error parameter should have a code of 0.
  • If it’s a socket-level error, set the C4Error appropriately.
  • If it’s a WebSocket-level close (when the factory’s framing equals to kC4NoFraming), set the error domain to WebSocketDomain and the code to the WebSocket status code. @param socket The socket. @param errorIfAny the status of the close; see description above.