Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[ruby-dev:28835] Re: udp test with ruby 1.8.5 preview1 on cygwin: msg#00159

lang.ruby.devel

Subject: [ruby-dev:28835] Re: udp test with ruby 1.8.5 preview1 on cygwin

send の第一引数が mesg なので変わって当然でした orz
空だとダメですね.

$ /usr/local/ruby-1.8.5-preview1/bin/ruby -rsocket -ve '
> u1 = UDPSocket.new
> u2 = UDPSocket.new
> u1.bind("127.0.0.1", 0)
> u2.send("", 0, u1.getsockname)
> p u1.recv(10)
> '
ruby 1.8.5 (2006-06-22) [i386-cygwin]

-e:6:in `recv': Interrupt
from -e:6

$ /usr/local/ruby-1.8.5-preview1/bin/ruby -rsocket -ve '
u1 = UDPSocket.new
u2 = UDPSocket.new
u1.bind("127.0.0.1", 0)
u2.send("a", 0, u1.getsockname)
p u1.recv(10)
'
ruby 1.8.5 (2006-06-22) [i386-cygwin]
"a"

$ /usr/local/ruby-1.8.5-preview1/bin/ruby -rsocket -ve '
u1 = UDPSocket.new
u2 = UDPSocket.new
u1.bind("", 0)
u2.send("a", 0, u1.getsockname)
p u1.recv(10)
'
ruby 1.8.5 (2006-06-22) [i386-cygwin]
-e:5:in `send': Cannot assign requested address - send(2)
(Errno::EADDRNOTAVAIL)

from -e:5

> In article <449D66EC.8050405@xxxxxxxxx>,
> info@xxxxxxxxx writes:
>
>> bind するアドレスを 127.0.0.1 にすると cygwin でも戻ってきますが、結果が
>> 違いますね。
>
>> u2.send("127.0.0.1", 0, u1.getsockname)
>
> 送るデータが "127.0.0.1" になってますが、ここが "" だとどう
> でしょう。




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation