From: Waldemar Renz Date: 2012-08-18T00:44:14+09:00 Subject: Re: Connection refused.again Robert Klemme wrote in post #1072672: > On Fri, Aug 17, 2012 at 4:23 PM, Waldemar Renz > wrote: >> Can you please help me? > > Unlikely as long as you do not disclose any details about what you are > trying to do and what program you are using. > > Cheers > > robert I am very sorry, i totally forgot it. I am using RGSS with the library of Ruby 1.8.1 to get a modified version of the Server/Client example from www.ruby-doc.org to run. Server: $s = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, Socket::IPPROTO_TCP) $ais = Socket.sockaddr_in(7654, nil) $s.bind($ais) Kernel.pbMessage(_INTL("Waiting for Player.")) $s.listen(2) client=$s.accept client.puts "Hello!" Kernel.pbMessage(_INTL("Server initialisiert")) Client: $c = Socket.new(Socket::AF_UNSPEC, Socket::SOCK_STREAM, Socket::IPPROTO_TCP) $aic = Socket.sockaddr_in(7654, '127.0.0.1') $c.connect($aic) print("Client initialised.") And the error message points to following line, marked between (*) class SocketError < StandardError ENOASSOCHOST = "getaddrinfo: no address associated with hostname." def self.check errno = Winsock.WSAGetLastError #if not Network.testing? == 1 (*) raise Errno.const_get(Errno.constants.detect { |c| Errno.const_get(c).new.errno == errno }) (*) #else # errno != 0 ? (Network.testresult(true)) : (Network.testresult(false)) #end end end -- Posted via http://www.ruby-forum.com/.