~qeef/wschat

1242e592f6fd1660f2dd3cbffb5036ab106f83f5 — Jiri Vlasak 4 years ago 52f1250 + 373caa5
Merge branch 'hotfix/0.1.2'
4 files changed, 11 insertions(+), 3 deletions(-)

M CHANGELOG.md
M Cargo.toml
M src/main.rs
M static/c.js
M CHANGELOG.md => CHANGELOG.md +8 -0
@@ 12,6 12,14 @@ The format is based on [Keep a Changelog][] and this project adheres to
Unreleased
==========

0.1.2 -- 2020-08-18
===================

Changed
-------

- Set listening port to 80.

0.1.1 -- 2020-08-13
===================


M Cargo.toml => Cargo.toml +1 -1
@@ 1,6 1,6 @@
[package]
name = "wschat"
version = "0.1.0"
version = "0.1.2"
authors = ["Jiri Vlasak <jiri.hubacek@gmail.com>"]
edition = "2018"
description = "Very simple WebSocket chat server."

M src/main.rs => src/main.rs +1 -1
@@ 31,7 31,7 @@ async fn main() {
        .map(|socket: Ws, clients| {
            socket.on_upgrade(move |ws| new_client(ws, clients))
        });
    warp::serve(route).run(([0, 0, 0, 0], 8080)).await;
    warp::serve(route).run(([0, 0, 0, 0], 80)).await;
}

async fn new_client(ws: WebSocket, clients: Clients) {

M static/c.js => static/c.js +1 -1
@@ 1,6 1,6 @@
const messages = document.getElementById("messages");
const msg = document.getElementById("msg");
const uri = "ws://localhost:8080";
const uri = "ws://localhost:80";
const ws = new WebSocket(uri);

function add_msg(t)