Les Partages de Memiks
Tag cloud
Picture wall
Daily
RSS Feed
  • RSS Feed
  • Daily Feed
  • Weekly Feed
  • Monthly Feed
Filters

Links per page

  • 20 links
  • 50 links
  • 100 links

Filters

Untagged links
1 result tagged websocket  ✕
A basic implementation of a PHP WebSocket server (RFC 6455) https://github.com/srchea/PHP-Push-WebSocket/
Wed Nov 26 00:04:27 2014 archive.org
QRCode
thumbnail

Pas mal cette implémentation de websocket en PHP.

avec Nginx version

et la configuration suivante :
location /hello/ {
proxy_pass http://localhost:5001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

J'ai juste changé le code pour se connecter à la socket dans front.html comme suit :
var ws, url = 'wss://"domain"/hello/';

et hop ça roule ! ;)

Du coup je fais du websocket en php sous https avec le même port (443) ;) merci nginx.

Il faut juste penser à lancer le "serveur" php via :
php -q ppws_server.php

Testé sous la dernière version de firefox

websocket php nginx firefox https port
4756 links, including 1670 private
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Theme by kalvn