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
serverSocketThe 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
serverSocketThe server socket which is affected by the error.
errorThe error which was encountered.
View on GitHub
ServerSocketDelegate Protocol Reference