
-----------------------------------
Homer_simpson
Tue May 27, 2003 9:27 pm

Net.WaitForConnection freezes the program
-----------------------------------
Net.WaitForConnection freezes the program until a connection has been established is there anyway to avoid that...?
perhaps using process and fork?

-----------------------------------
Tony
Tue May 27, 2003 9:39 pm


-----------------------------------
yes, you could have it running in a process in the background, and once new connection is made, call the procedure to add user to the chat and do w/e else you need.

-----------------------------------
Homer_simpson
Tue May 27, 2003 9:43 pm


-----------------------------------
I really suck at processes and fork could u explain how process and fork work?!

-----------------------------------
Tony
Tue May 27, 2003 9:46 pm


-----------------------------------

process waiting
loop
Net.WaitForConnection
end loop
end waiting

fork waiting

loop
put "this is main loop
end loop


This will basically randomly pick the procedure from which to execute a line between the process and your main loop.

something like

process
main
process
process
main
process
main
main
process
main

Its random and still 1 line at a time, not at same time... just to let you know.
