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

[REBOL] Re: Rugby Question

From: mattsmac:hotm:ail at: 4-Nov-2003 12:15

Here are the two changes, they are in the process-ports function and the hipe-serv object type I obviously have only tested these chages for my particular scenario process-ports: func [ {Processes all ports that have events.} portz [block!] {The port list} /local temp-obj ] [ repeat item portz [ either (is-server? item) [ either item/scheme = 'udp ;udp, so call our handler [ temp-obj: get-handler item temp-obj copy item ] [ init-conn-port item first item ] ] [ if item/scheme = 'tcp [ rugby-server/current-ip: item/remote-ip <------NEW temp-obj: select hipe-serv/object-q item temp-obj/lastaccess: now temp-obj/handler temp-obj ] ] ] hipe-serv: make object! [ ;Our list of server ports server-ports: copy [] ;Our server to handler mapping server-map: copy [] ; The list of ports we wait/all for in our main loop port-q: copy [] ; Mapping of ports to objects containg additional info object-q: copy [] ; Restricted server list restricted-server: make block! 20 ; Server restrictions? restrict: no ;The thread queue threads: copy [] current-thread: none conn-timeout: 0:0:30 current-ip: none <---------NEW max-thread-waiting: 100 Matt MacDonald