synopse / mORMot

Synopse mORMot 1 ORM/SOA/MVC framework - Please upgrade to mORMot 2 !
https://synopse.info
785 stars 323 forks source link

fix: SynBidirSock.pas raise access violation errors when ProcessMask() #434

Closed ysair closed 1 year ago

ysair commented 1 year ago
  1. run Project31WinHTTPEchoServer.exe
  2. execute this test code:
    var
    Client :  THttpClientWebSockets;
    protocol : TWebSocketProtocol;
    frame: TWebSocketFrame;
    begin
    protocol := TWebSocketProtocolChat.Create('meow', 'whatever');
    Client := THttpClientWebSockets.WebSocketsConnect(
      'localhost','8888',protocol, nil, '', 'whatever');
    frame.opcode  :=  focText;
    frame.content :=  [];
    frame.payload :=  'test1234';
    Client.WebSockets.SendFrame(frame); //av error
    Client.free;
    end;
synopse commented 1 year ago

I have made two commits to fix the RemoteIP issue and properly document TWebSocketFrame.payload use.