From: Stuart Brand Date: 2006-06-23T03:48:07+09:00 Subject: Re: while in a tk mainloop :) Yippee! It worked, the is below root = TkRoot.new { title "Proxy Server" } Thread.new{Tk.mainloop} server = TCPServer.new('0.0.0.0', 8080) while (session = server.accept) Thread.new{MainServer.handle_connection(session)} end this creates a new thread for the Tk box and then lets the while loop carry on Many thanks for your help all Stuart -- Posted via http://www.ruby-forum.com/.