From: Brad Date: 2003-12-03T08:57:07+09:00 Subject: Re: TCP/IP in Ruby jjh-ruby-talk@vieorhythms.com wrote: > >>>>> "BCoish" == BCoish writes: > > Sorry for taking so long to reply. > > BCoish> First, thanks for the speedy response! Second, I modified the > BCoish> source per your suggestions, but without success. This is now > BCoish> the code I'm running: > > [...] > > BCoish> Even if I break s.gets.upcase down into it's constituent parts > BCoish> the problem persists. Any other ideas? (I'm fresh out) :) > > Have you tried doing an explicit flush on the socket? So you would have > the following? > > # CLIENT.RB > # ========= > require 'socket' > s=TCPSocket.new("localhost", ARGV[0]) > s.write("test\n") > s.flush > puts s.gets > s.close() > > # SERVER.RB > # ========= > require "socket" > gs = TCPserver.open(0) > printf("server is on port %d\n", gs.addr[1]) > s = gs.accept > line = s.gets > puts line > s.write(line.upcase) > s.flush > s.close > > BCoish> Perhaps something in the actual implimentation is the same > BCoish> everywhere else except for OpenVMS. Hmm, wouldn't be the first > BCoish> time, but it is a pain. :) > > I don't have access to an OpenVMS machine myself so I'm just throwing > out ideas here. > > enjoy, > > -jeremy > > > > > Jeremy: Thanks for the reply! Unfortunately flushing the socket seems to have had no effect. I think there is something internally, within the socket implementation for OpenVMS, that is the problem. Something that I am not yet familiar with. (like another post I made to the group regarding threads: I had only to make an O/S specific define to make ruby threads work on OpenVMS) If I find the answer I'll be sure to post it. And if you, or anyone else has any further ideas I'm open to suggestions. I think I've just about exhausted my resources. :) (But that doesn't mean I'm giving up.) Regards, Brad