socket.recvfrom()で返ってくるアドレスがおかしい?
Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> s.connect(('www.google.co.jp', 80)) >>> s.sendall('GET / HTTP/1.0\r\n\r\n') >>> data, address = s.recvfrom(8192) >>> print address (0, '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') >>>
socketの使い方はこれで合っているのか自信が無いけど、どうなんだろうこれ。
IronPython の socket.recvfrom() の不具合:ある nakagami の日記:So-netブログ
IronPython - View Issue #5814: recvFrom in the socket module always returns 0.0.0.0,0 as the remote address
IronPythonでも同じ挙動が出るようで、CPython 2.5.1でも書いてあるんですがこれと同じ?