Giter VIP home page Giter VIP logo

delphionrails's People

Contributors

hgourvest avatar pierreyager avatar zedalaye avatar

Watchers

 avatar

delphionrails's Issues

OnMessage event in DLL doesn't reised

Firstly, thanks for great work. 
I try to use websocket in my libriry, but i have no event.

constructor TMyClass.Create;
begin
  FWebS := TWebSocket.Create;
  FCtx := TSuperRttiContext.Create;
  FWebS.OnMessage:=procedure(const msg: string)
  var
    obj, ret: ISuperObject;
  begin
    obj := SO(msg);
    TrySOInvoke(FCtx, Self, 'ws_' + obj.S['action'], obj, ret);
  end;
  FWebS.Open('ws://echo.websocket.org');

procedure TMyClass.ws_echo(const value: string);
begin
  ShowMessage(value);
end;

procedure TMyClass.SendMessage(msg: string);
begin
  FWebS.Send(SO(['action', 'echo', 'value', msg]).AsString);
end;

When i send message from TMyClass.SendMessage, nothing happense.

Dephi 2010, Win7 x64

What's wrong in my code?

Original issue reported on code.google.com by [email protected] on 10 Nov 2014 at 11:33

LUA scripts with conditions and iterations

Are conditions and iterations supported? If not in DelphiOnRails, maybe there 
are known examples how I could use LUA for template scripting (HTML templates 
for example) with Delphi binding?

Original issue reported on code.google.com by [email protected] on 18 Nov 2010 at 7:13

r179 - TThread.Suspend and TThread.Resume aren't deprecated only, but seriously broken

In our application, we stumbled across serious connection issues after updating 
DOR (client sends a HTTP GET, but the server answers with a rude TCP RST and 
ProcessRequest routines won't even catch the GET). We could isolate the error 
to the dorSocketStub.pas changes in r179 (using TThread instead of Windows API).

Some research shows that ignoring the deprecated warning for TThread.Suspend 
and TThread.Resume is fatal - using these can lead to freed memory being used, 
especially for applications using many threads. See 
http://qc.embarcadero.com/wc/qcmain.aspx?d=26291 for an official bug, 
http://stackoverflow.com/questions/1418333/tthread-resume-is-deprecated-in-delph
i-2010-what-should-be-used-in-place for a more broad discussion.

Also, from http://docwiki.embarcadero.com/VCL/en/Classes.TThread.Suspend:

"Warning: The Resume and Suspend methods should only be used for debugging 
purposes. Suspending a thread using Suspend can lead to deadlocks and undefined 
behavior within your application. Proper thread synchronization techniques 
should be based on TEvent and TMutex."

Original issue reported on code.google.com by [email protected] on 16 Mar 2012 at 12:53

RWSocket WriteTimeout set

perhaps FReadTimeout should be FWriteTimeout,

function TRWSocket.Write(var buf; len, Timeout: Cardinal): Cardinal;
begin
  if (FReadTimeout <> Timeout) then
  begin
    setsockopt(FSocket, SOL_SOCKET, SO_SNDTIMEO, @Timeout, SizeOf(Timeout));
    FWriteTimeout := Timeout;
  end;

  Result := Winsock.send(FSocket, buf, len, 0);
end;

just learn dor, very excellent work.

kenter

Original issue reported on code.google.com by [email protected] on 31 Aug 2011 at 2:21

Please support WebSockets 06 Protocol Specs (Published Feb 25, 2011) or newer

The new WebSockets 06 handshake is much improved. It avoids the extra 8 bytes 
during handshake which causes a deadlock with proxies. Also, it uses SHA1 
instead of MD5.

Wikipedia has a nice summary of draft-ietf-hybi-thewebsocketprotocol-06:
http://en.wikipedia.org/wiki/WebSockets

Here's WebSockets 06 Protocol Specs:
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-06

ps

Your work is amazing: superobject, delphichromiumembedded and now I found 
WebSockets for Delphi in this project.  Thank you for making Delphi interesting!

Original issue reported on code.google.com by [email protected] on 16 Apr 2011 at 3:47

AV in dorSocketStub.pas, similar to r234

In dorSocketSub.pas, TCustomObserver.ProcessEvents, an AV can happen similar to 
the one fixed in r234, TCustomObserver.TEventProcessor.Run. Change suggestion:

  procedure TCustomObserver.ProcessEvents;
  var
    Events, Event: ISuperObject;
    proc: TEventProc;
  begin
    Events := ExtractEvents;
    if Events <> nil then
      for Event in Events do
        if ObjectIsType(Event, stObject) and ObjectIsType(Event.AsObject['event'], stString) then
        begin
          if FEventProc.TryGetValue(Event.S['event'], proc) then
            proc(Event);
        end else
          doOnInternalEvent(Event);
  end;

Checking Event for nil shouldn't be required as ObjectIsType should take care 
about this case.

Original issue reported on code.google.com by [email protected] on 11 Apr 2012 at 11:40

Empty HTTP parameter values

Passing strings containing empty values (like "[...]emptyparam=&[...]") to 
HTTPInterprete leads to a range check error.

Here's a workaround that works for me (dorHTTPStub.pas, line 231):

          if (i + 1) <= Length(S) then
            value := TSuperObject.Create(PSOChar(@S[i+1]))
          else // empty value
            value := TSuperObject.Create('');

Original issue reported on code.google.com by [email protected] on 15 Feb 2012 at 11:34

dorUtils.pas, Base64ToStream, range checks

When debugging or running an application using the IDE with range checking 
enabled, Delphi throws "range check error" exceptions because some of the 
results assigned to buf[] exceed byte range.

This change solves the issue:

    // reverse process of above
    buf[0] := (((Base64Map[data[i]] shl byte(2)) or (Base64Map[data[i + 1]] shr byte(4)))) and $FF;
    buf[1] := ((Base64Map[data[i + 1]] shl 4) or (Base64Map[data[i + 2]] shr 2)) and $FF;
    buf[2] := ((Base64Map[data[i + 2]] shl 6) or (Base64Map[data[i + 3]])) and $FF;

Original issue reported on code.google.com by [email protected] on 16 Mar 2012 at 3:26

Exception after client closes connection

When closing a client connection, I often got Delphi exceptions in 
dorActionWebSocket.pas, TActionWebsocket.Output, line "Write(b, 1, 0);". It 
turns out that FStub.Source was nil, so perhaps checking FStub.Source for being 
nil would be good before attempting to call the Write method.

Same for the Write calls in TActionWebsocket.OutputMessage and 
TActionWebsocket.OutputStream (that one doesn't even have a try..finally around 
the Write call).

Original issue reported on code.google.com by [email protected] on 23 Feb 2012 at 3:42

exit EXIT

Amazing project, thnx,  should get more attention !!!

Delphi XE2 update 3 on Windows XP:

little typo i think:

when the server is running it says 

  writeln(' > EXIT   : Stop application.');

but it checks for lowercase

     if comparetext(Cmd, 'exit') = 0 then

Original issue reported on code.google.com by [email protected] on 26 Jan 2012 at 2:03

TRWSocket.Read/Write, range check errors

When running our application in the Delphi IDE, we get range check errors at 
the following line of TRWSocket.Write:

  Result := Winsock.send(FSocket, buf, len, 0);

Disabling range checking in compiler options or using {$R} works, but doesn't 
feel good.

TRWSocket.Read receives messages byte by byte, changing it to

  Result := Winsock.recv(FSocket, buf, len, 0);

also leads to range check errors.

Unfortunately changing TRWSocket.Write to send byte by byte doesn't work, it 
seems to get too slow this way and break communication.

So, my questions would be:
  Is it possible that buf has to be passed to Winsock.recv/send different?
  What's the reason for receiving byte by byte, but sending at once?

Original issue reported on code.google.com by [email protected] on 16 Feb 2012 at 3:58

problem with TDatetime

What steps will reproduce the problem?
1. create a variable type tdatetime at class TBlog
2. edit view/blog/edit.html and add a field to the new variable
3. post the form, the value is wrong of the variable



Original issue reported on code.google.com by [email protected] on 10 Nov 2011 at 9:39

Some Suggestions for DOR

I tried once, it looks good, but I have some Suggestions:
1, increase the session management capabilities
2, increasing the security check
3, add some other language platform client interface, such as basic4android


Original issue reported on code.google.com by [email protected] on 15 Apr 2013 at 4:38

Can't compile demo web server

// I do not know much English

After cloning the source code I can not compile samples. Project files are 
missing madExcept, superobject, supertypes...
where to find them? or am I doing something wrong.

// I like the idea of creating DOR. I would like to be helpful



Original issue reported on code.google.com by [email protected] on 3 May 2014 at 7:10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.