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

[REBOL] event driven mechanism? (was) Re: Re: Rugby doco - wip

From: petr::krenzelok::trz::cz at: 29-Jan-2002 15:08

Romano Paolo Tenca wrote:
> Hi pekr, > > > > This is the mode in which async code was executed by ARexx on old Amiga. > > > > That's nice, excempt, imo, above scenario looses capability of getting thru > > firewall, because of custom = non 80 port Rugby is supposed to connect back > to. > > Anyone? > > Client port could be 80, the message arriving has an unique ID created by user > and copied by server to mark the answer message (on Amiga ports was free - > only memory limited them - in TCP they have a limit, perhaps it should be > better to use ID instead of port number). To think the message like an object, > it could be: > > message: make object [ > adress: > portnum: 80 > id: 1234 ;integer or issue > body: [] > ]
well, I am no TCP guru, but ... it doesn't answe my question imo. Let's imagine my scenario: - you have proxy support in your company - my example, we use 3128 port number. So, I have to use Rugby in http mode. Rugby uses http tunneling mechanism to get thru proxy to remote 80 port. In one of your earlier posts you stated that your machine "would listen on certain port" or something like that. But that's not possible imo, as e.g. our company doesn't allow any active connection from outside ports to internal networks, being it port 80 or different ... so - we should forget tcp listen port here. As for me, I was a little bit confused, and pushed Maarten to do something similar. I didn't liked polling for result. Then I looked at 'result-available? function and found out, there is not any additional request sent to remote Rugby machine - it just checks for data on your already opened port ... so basically - functionality is in there already ... correct me someone if I am wrong ... So, the only one problem I have with the functionality is the need to poll for result using 'result-available? function (or block by using wait-for-result function). I would prefer event driven kind of behavior. IIRC, there is some kind of 'wake field in port, which is triggered each time something happens on port. But I am not sure if such port has to be put into wait-list or not. So basically, 'result-available? could be called automatically each time new data arrives on the port. Maarten? :-) -pekr-