P
Philliam Auriemma
Hey guys,
I am doing some socket programming in ruby and I was wondering if
there was a limit to the amount of data you should write to a socket
at one time. For example, if I do
a = File.new("blah") #file blah is 20mb
str = ""
while !a.eof? do
str += a.gets
end
sock.puts(str)
While this is an extreme example, a similar thing would happen if you
just wrote one line at a time to the socket in a while loop because it
would all happen so fast. So that's my question, is there a limit of
what you should write to a socket, or how fast you should do it?
I am doing some socket programming in ruby and I was wondering if
there was a limit to the amount of data you should write to a socket
at one time. For example, if I do
a = File.new("blah") #file blah is 20mb
str = ""
while !a.eof? do
str += a.gets
end
sock.puts(str)
While this is an extreme example, a similar thing would happen if you
just wrote one line at a time to the socket in a while loop because it
would all happen so fast. So that's my question, is there a limit of
what you should write to a socket, or how fast you should do it?