Skip to content

slimane-swift/WebSocketServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebSocketServer

WebSocket Middleware/Responder for Slimane

Usage

Server

import WebSocketServer
import Slimane

let app = Slimane()

let wsServer = WebSocketServer { socket, request in
    socket.onText { text in
        socket.send("PONG")
    }
}

app.use(wsServer)

try! app.listen()

License

WS is released under the MIT license. See LICENSE for details.

About

WebSocket Middleware/Responder for Slimane

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages