From: matz@... (Yukihiro Matsumoto) Date: 2002-07-02T12:59:03+09:00 Subject: Re: Reusing sockets Hi, In message "Reusing sockets" on 02/07/02, Joseph McDonald writes: |while true | s.connect(sockaddr) | s.close |end |Here is what I get: |./reuse.rb |connected |./reuse.rb:15:in `connect': closed stream (IOError) | from ./reuse.rb:15 Don't close. You loose the underlying socket connection (the file descriptor) when you close the socket. |Also, anyone know of a more efficient way to pack the IP? If you are using 1.7 socket, Socket.sockaddr_in(port, host) is available. matz.