fuckwebsockets/run.php

50 lines
600 B
PHP

<?php
new app();
class app{
public function __construct(){
include "lib/fuckwebsockets.php";
$this->ws = new fuckwebsockets();
$this->ws->create_server(
[
"ip" => "localhost",
"port" => 8080
]
);
}
public function onConnect($client){
}
public function onFailedConnect($source, $opcode, $reason){
}
public function onPing($client, $message){
}
public function onPong($client, $message){
}
public function onMessage($client, $opcode, $message){
}
public function onDisconnect($client, $opcode, $reason){
}
}