Droplet WebSockets server using Swift
Swift CSS JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Config
Localization
Public
Resources/Views
Sources/App
.gitignore
.travis.yml
Package.swift
Procfile
README.md
app.json
license

README.md

Droplet WebSockets

Build and Run

$ vapor build

$ vapor run

WebSocket Client

We can use javascript

var ws = new WebSocket("ws://0.0.0.0:8080/ws")

ws.onmessage = function(msg) {
    console.log(msg)
}

ws.onopen = function(event) {
    ws.send("Hello, there!")
}

Screenshot

screen shot 2016-12-01 at 11 25 30 pm