Z
Zach Dennis
Everynow and then I get issues with using BasicSocket or any of its
subclasses. I continually get errors like:
listeners.rb:136:in `recv': An established connection was aborted by the
software in your host machine. - recvfrom(2) (Errno::ECONNABORTED)
On this one I have no clue. Should I try to resend my data?
or errors like:
Errno::EINVAL while doing a:
socket.puts "test" unless socket.closed?
I see that if a socket gets shutdown, it will not appear closed, but you
still can't use the socket.. is there any way to determine if a socket
shutdown?
irb(main):001:0> require 'socket';
irb(main):002:0* s = TCPSocket.new( 'www.google.com', 80 )
=> #<TCPSocket:0x2dc41c8>
irb(main):003:0> s.shutdown
=> 0
irb(main):004:0> s.puts "/GET"
Errno::EINVAL: Invalid argument
from (irb):4:in `write'
from (irb):4:in `puts'
from (irb):4
irb(main):005:0>
In my code I never manually call shutdown, but perhaps its getting
called w/o my help?
Zach
subclasses. I continually get errors like:
listeners.rb:136:in `recv': An established connection was aborted by the
software in your host machine. - recvfrom(2) (Errno::ECONNABORTED)
On this one I have no clue. Should I try to resend my data?
or errors like:
Errno::EINVAL while doing a:
socket.puts "test" unless socket.closed?
I see that if a socket gets shutdown, it will not appear closed, but you
still can't use the socket.. is there any way to determine if a socket
shutdown?
irb(main):001:0> require 'socket';
irb(main):002:0* s = TCPSocket.new( 'www.google.com', 80 )
=> #<TCPSocket:0x2dc41c8>
irb(main):003:0> s.shutdown
=> 0
irb(main):004:0> s.puts "/GET"
Errno::EINVAL: Invalid argument
from (irb):4:in `write'
from (irb):4:in `puts'
from (irb):4
irb(main):005:0>
In my code I never manually call shutdown, but perhaps its getting
called w/o my help?
Zach