Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

remote-ip in RebXR

 [1/9] from: compkarori::gmail::com at: 19-Jul-2009 13:24


Andreas I'm going to use RebXr for a few utilities. Is there an easy way for the server to read the remote-ip of the connecting client? Or is it hidden inside the async protocol? -- Graham Chiu http://www.synapsedirect.com Synapse - the use from anywhere EMR.

 [2/9] from: andreas::bolka::gmx::net at: 21-Jul-2009 23:19


Graham, On Sun Jul 19 03:24:07 +0200 2009, Graham Chiu wrote:
> I'm going to use RebXr for a few utilities.
Nice. Let me know of any shortcomings you encounter.
> Is there an easy way for the server to read the remote-ip of the > connecting client? Or is it hidden inside the async protocol?
I think it should be available via port/sup-port/remote-ip. But this depends on where you need to access it: in the server itself or within a method exposed (and invoked) via XML-RPC? -- Regards, Andreas

 [3/9] from: compkarori:gma:il at: 22-Jul-2009 9:30


Andreas I wanted to use it within an exposed method. I noticed that when returning dates, the xmlrpc server would just shut down :( On Wed, Jul 22, 2009 at 9:19 AM, Andreas Bolka<andreas.bolka-gmx.net> wrote:
> Graham, > On Sun Jul 19 03:24:07 +0200 2009, Graham Chiu wrote:
<<quoted lines omitted: 11>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse - the use from anywhere EMR.

 [4/9] from: compkarori::gmail at: 22-Jul-2009 9:40


Here's the bug server:
>> date: does [ return now/date ] >> xmlrpc-serve 9001 [ now date ]
** Script Error: Cannot use path on none! value ** Where: rejoin ** Near: pad-zero date/time/1 ":" pad-zero date/time/2
>>
client:
>> xmlrpc-exec http://localhost:9001 [ now ]
== 22-Jul-2009/9:37:38
>> xmlrpc-exec http://localhost:9001 [ date ]
** Access Error: Network timeout ** Where: xmlrpc-exec ** Near: tmp: copy con On Wed, Jul 22, 2009 at 9:30 AM, Graham Chiu<compkarori-gmail.com> wrote:
> Andreas > I wanted to use it within an exposed method.
<<quoted lines omitted: 8>>
>> Nice. Let me know of any shortcomings you encounter. >>
-- Graham Chiu http://www.synapsedirect.com Synapse - the use from anywhere EMR.

 [5/9] from: andreas:bolka:gmx at: 22-Jul-2009 1:10


Graham, On Tue Jul 21 23:30:13 +0200 2009, Graham Chiu wrote:
> I wanted to use it within an exposed method.
Well, that'll require a change to the server. Please give attached patch a try, it allows you to get an "xmlrpc context" by calling 'xmlrpc-context. Such a context currently only has a single field: 'client-port. An example exposed method, to illustrate usage: foo: func [/local ctx] [ ctx: xmlrpc-context mold ctx/client-port/remote-ip ] The patch is against the "2004-09-19 experimental release".
> I noticed that when returning dates, the xmlrpc server would just shut > down :(
XML-RPC does not support pure dates, but only dates which also have a time; those work fine with rebXR:
>> ; server session >> xmlrpc-serve 9090 [now] >> ; client session >> xmlrpc-exec http://localhost:9090/ [now]
== 21-Jul-2009/23:37:18 But I guess it may make sense, to simply set the time to 00:00:00 if no explicit time is given. In any case, I agree that the server simply crashing on missing time values is rather rude :) -- Regards, Andreas -- Binary/unsupported file stripped by Ecartis -- -- Type: application/octet-stream -- File: client-port.patch

 [6/9] from: andreas:bolka:gmx at: 22-Jul-2009 1:15


On Wed Jul 22 01:10:25 +0200 2009, Andreas Bolka wrote:
> On Tue Jul 21 23:30:13 +0200 2009, Graham Chiu wrote: > > I wanted to use it within an exposed method. > Well, that'll require a change to the server. Please give attached patch > a try,
Ah, I forgot about stupid Ecartis stripping simple attachements; please get the patch from: http://earl.strain.at/rebol/rebXR/patches/client-port.patch -- Regards, Andreas

 [7/9] from: compkarori::gmail at: 22-Jul-2009 11:18


Andreas Can you put the patch on your site? Ecartis strips out binaries. On Wed, Jul 22, 2009 at 11:10 AM, Andreas Bolka<andreas.bolka-gmx.net> wrote:
> Graham, > On Tue Jul 21 23:30:13 +0200 2009, Graham Chiu wrote:
<<quoted lines omitted: 8>>
> =A0 =A0] > The patch is against the "2004-09-19 experimental release".
Is that going final anytime ? :)
> -- Binary/unsupported file stripped by Ecartis -- > -- Type: application/octet-stream > -- File: client-port.patch >
-- Graham Chiu http://www.synapsedirect.com Synapse - the use from anywhere EMR.

 [8/9] from: compkarori:gmai:l at: 22-Jul-2009 22:01


Andreas On Wed, Jul 22, 2009 at 11:10 AM, Andreas Bolka<andreas.bolka-gmx.net> wrote:
> Graham, > On Tue Jul 21 23:30:13 +0200 2009, Graham Chiu wrote:
<<quoted lines omitted: 3>>
> 'xmlrpc-context. Such a context currently only has a single field: > 'client-port. An example exposed method, to illustrate usage:
Looks like it is working but the context is including the whole subport and not just a single field. Not that it matters. -- Graham Chiu http://www.synapsedirect.com Synapse - the use from anywhere EMR.

 [9/9] from: andreas:bolka:gmx at: 22-Jul-2009 15:22


Graham, On Wed Jul 22 12:01:23 +0200 2009, Graham Chiu wrote:
> On Wed, Jul 22, 2009 at 11:10 AM, Andreas Bolka<andreas.bolka-gmx.net> wrote: > > On Tue Jul 21 23:30:13 +0200 2009, Graham Chiu wrote:
<<quoted lines omitted: 5>>
> > 'client-port. > Looks like it is working
Good to hear. Actually, the patch introduces a stupid race condition; a fixed version is available at: http://earl.strain.at/rebol/rebXR/patches/client-port2.patch Be sure to revert the old patch before applying this one. I'll combine this and a fix to the date issue you noted, and put up a new version of rebXR within the next week. -- Regards, Andreas

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted