From: Mark Slagell Date: 2002-02-22T12:18:12+09:00 Subject: Re: Any ideas on why this doesn't work? Rick wrote: >require 'socket' >server = TCPServer.new('127.0.0.1',5190) >while (session = server.accept) > begin > thisUser = session.gets > thisUser = thisUser.scan(/(.*?)<\/user>/).to_s > > session.print "#{thisUser}\0" > > ensure > session.close if session > #puts "sesson closed" > end >end > >TIA, > >Rick > No problem I can see. A bare "netcat" client... echo "me" | nc localhost 5190 ... produces this me Which looks kinda like what it should do I guess. Mark