ServerSocketDelegate

public protocol ServerSocketDelegate

Delegate for a server socket.

The delegate of a server socket will receive notifications about new connections or errors.

  • The delegate is notified that the server accepted a new connection by getting a call to this method.

    • paramerer socket: Socket of the new connection.

    Declaration

    Swift

    func serverSocket(_ serverSocket: ServerSocket, didAcceptConnectionWithSocket socket: Socket)

    Parameters

    serverSocket

    The server socket which received the connection.

  • The delegate is notified about an error which occurred by getting a call to this method.

    Declaration

    Swift

    func serverSocket(_ serverSocket: ServerSocket, didFailToAcceptConnectionWithError error: SocketError)

    Parameters

    serverSocket

    The server socket which is affected by the error.

    error

    The error which was encountered.