#1 Re: mORMot 1 » Client-Server Callbacks » 2017-12-17 13:17:34

Okay. Thanks for the clarification.
I am a newbie, and I wanted my server (TWebSocketServer), to have communication via websockets, at the same time for clients "html" and mORMOt clients.

#2 Re: mORMot 1 » Client-Server Callbacks » 2017-12-17 01:14:41

Hi,

@ab Thanks for all your work.
It's amazing.

I have FPC and I have tried TWebSocketServer.WebSocketBroadcast(), with several "html" clients and it works very well. Excellent!

I would like not only to have websockets clients "html", but also to add clients made with mORMot.

I tried to do it with "THttpClientWebSockets" but I do not know how to use it.

I appreciate some guidance.

#3 Re: mORMot 1 » mORMot Websockets consume from Javascript » 2017-01-24 14:00:04

Thanks turrican,

Interesting analysis you have done.

I confirm that making the change you have put in "ProcessHandshake" with "Result: = true;"
It works correctly in the web browser: "Chrome" but still does not work with "Microsoft Edge"

When comparing the SynBidirSock.pas files of the current version with the October (Works in all web browsers):
The parts of the code you have published do not exist in the October version.

#4 Re: mORMot 1 » mORMot Websockets consume from Javascript » 2017-01-23 20:18:45

turrican wrote:

Solved by this way : http://pastebin.com/UrMHSneL

Another question... Chrome and Firefox returns a 401 and 400 when try to access : http://localhost:8888/whatever/

IExplorer goes well.

If you compile with mORMot versions of October or earlier, it works correctly on all web browsers: Chrome, Firefox ... etc

That's what I tried to say here:
https://synopse.info/forum/viewtopic.php?id=3747

#6 mORMot 1 » Issues with websockets and the latest versions of Mormot » 2017-01-06 16:02:47

rclaros
Replies: 1

I am in the example "31 - WebSockets", specifically:
"Project31SimpleEchoServer"

If I compile with Mormot versions of October or before, everything works OK.

But when compiling with the latest versions of Mormot,
Opening "Project31SimpleEchoServer.html" does not detect it.

I hope I can provide some help.

Best regards.

#7 Re: mORMot 1 » NewPascal with mORMot - first release » 2016-07-14 16:49:11

Congratulations on this. Excellent job @hnb, @AOG @ab and all his team Mormot .

When compiling with build mode Win32
DDD shared units
failed

Optimization changing levels of 2 ( -O2 ) to 1 ( -O1 ) everything is OK .
That's great!

Cordially

Reynaldo

#8 Re: mORMot 1 » Websocket notification from server to web client » 2016-06-21 19:39:22

Hello EMartin,

You could share your complete solution ?

I do not understand is what your class " TCCAgentWS " ...

I appreciate all the guidance you can provide .


EMartin wrote:

I solved this saving reference from TWebSocketProtocolChat and THttpServerResp:

  // protocol class implementation
  TCCAgentWSProtocol = class(TWebSocketProtocolChat)
  protected
    procedure ProcessFrame(Sender: THttpServerResp; const Frame: TWebSocketFrame);
  public
    CCAgentWS: TCCAgentWS; // my class using websocket protocol class
  end;

  // ProcessFrame implementation
procedure TCCAgentWSProtocol.ProcessFrame(Sender: THttpServerResp; const Frame: TWebSocketFrame);
begin
  case Frame.opcode of
    focContinuation:
    begin
      CCAgentWS.fWSProtocol := Self;
      CCAgentWS.fWSHttpServerResp := Sender;
    end;
    focConnectionClose:
    begin
      CCAgentWS.fWSProtocol := Nil;
      CCAgentWS.fWSHttpServerResp := Nil;
    end;
    ...
  end;
end;

It is not a mORMot solution but "it is what it is".

Thanks.

Board footer

Powered by FluxBB