You are not logged in.
Pages: 1
The main WebSockets process loop indeed checks for the Terminated flag, and close the connection when detected.
This sounds like detecting a user who disconnected by himself.
My intention was to kick a User who didn't have permission to join the connection.
In the meantime i found out that the Procedure "HttpServerWebSocketUpgrade"
can prevent a user from login.
With checking for "ORIGIN" and "SEC-WEBSOCKET-PROTOCOL" there are two parameter, that a unwanted user does not know.
It's probably laughable, but at least a sparkle of safety.
Additional it would't be bad to limit the incomming frames per minute or/and the size of binary payload.
Im sure the event TWebSocketProtocolEcho.OnIncomingFrame is too late for checking this, isn't it?
Hello,
i try to build a simple chat using the SimpleEchoServer project.
This works well but I missing the ability to determine who is allowed to connect.
Is there a possibility to specifically disconnect a user by the server?
---EDIT---
In the event assigned to TWebSocketProtocolEcho.OnIncomingFrame is a reference to Sender: THttpServerResp;
There is a procedure Sender.Terminate;
Im unsure if this is the best way to do this, but it seems to work.
I want to connect to the chat server with a browser based WebSocket client.
Many Browsers have this functionality.
Using Java script you can establish a connection to a WebSocket Server.
Something like this: http://www.websocket.org/echo.html
Most of the demos don't have encryption or compression so i set the following line in the server code:
HttpServer.WebSocketsEnable(Server,'',false,false).Settings.SetFullLog;
So the question:
Is the mORMot WebSocket compatible to the WebSocket that Server can provide in php with "socket_create()"
Okay.
For testing purposes i tried to connect web based clients to the chat server.
All four scripts won't connect to the server.
The Server wrote every time "WebSocketProcessUpgrade failed as 400"
The only thing i have changed is: HttpServer.WebSocketsEnable(Server,'',true,false).Settings.SetFullLog;
I tried also: HttpServer.WebSocketsEnable(Server,'',false,false).Settings.SetFullLog;
Is it possible to connect a web client to the chat server? If yes, what do i need to change else?
Hello,
i tested the project 31 (chat).
Is there any chance to run it under android?
If not, will php help?
Something like the following: Android App with IdHTTP-> php on external server for establish the websocket connection-> chat Server
regards, Andreas
Pages: 1