Class Protocols.WebSocket.Port
- Description
Creates a simple HTTP Server.
ws_cb
will be called for all incoming WebSocket connections. Its first argument are the list of protocols requested by the client and the second argument the corresponding Request object. The WebSocket connection handshake is completed by calling Request.websocket_accept.http_cb
will be called for all other HTTP Requests or ifws_cb
is zero.- See also
- Inherit
Port
inherit Protocols.HTTP.Server.Port : Port
- Method
create
Protocols.WebSocket.Port Protocols.WebSocket.Port(
function
(Protocols.HTTP.Server.Request
:void
)http_cb
,function
(array
(string
),Request
:void
)|void
ws_cb
,void
|int
portno
,void
|string
interface
)