RE: euLibnet and IRC

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 31 May 2001, at 16:10, Grape Vine wrote:

> Would you kindly post the source for that?
> 
> GrapeVine
> Kat wrote:
> > On 27 May 2001, at 9:59, Thomas Parslow (PatRat) wrote:

<snip>

Without any gui? All it's suitable for now is a bot running code. I put in a few
commands to verify it's working, but the only thing it can do now is replace 
the irc-connection-part of mirc,, not the gui (display and text entry). So you 
can write a program and launch it, but not interact thru it as a human. 

What i was hoping is if sleep(0) can be used to revert control to win32lib, and 
a higher priority task was found in the task que there, win32lib could shuffle 
the scheduled tasks so the line following the sleep(0) would not always be 
the next line executed, and this would eliminate some time spent polling the 
socket or continuously reading the ServerNeedsAttention(sock_connect[2]). 
It would be a cheap way to make pseudo-threads, by setting these priority 
flags, and the highest priority gets the cpu after the sleep(0).

Like:
-- start program
procedure checksocket()
while ServerNeedsAttention(sock_connect[2]) do
  keep looping, but at a low priority
  set priority real low
  sleep(0)
  deal with the data on the socket
end while
end procedure

procedure gui_code()
  the humans wants something!
  high priority!
end procedure

x = routine_id("gui_code")
set x high priority

end program
-------------------------------

So win32lib, when windoze gives it back the cpu, will check the callbacks, 
and rearrange the list in order of the priorities we dynamically set, and if we 
gui'd somehow, deal with that, and when done with that, then go back to the 
line after the sleep(0). But i doubt i can pull this off, so many more people 
have tons more windows gui experinece than i have.

Oh, and it is for tcp4u, not euLibnet. Still want it?

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu