digitalmars.D - Problems with Socket on linux
- 4ybaka (7/7) Dec 20 2009 Hi!
- 4ybaka (2/9) Dec 20 2009 Sorry, I forget. I used dmd 2.037
- Walter Bright (3/13) Dec 23 2009 No, but if you figure it out, can you please post a patch? Also, can you...
Hi!
I run code like this on linux (Arch and Kubuntu 9.04):
TcpSocket socket = new TcpSocket(new InternetAddress("www.google.com", 80));
socket.send("GET /intl/en_ALL/images/logo.gif HTTP/1.0\r\n\r\n");
SocketStream socketStream = new SocketStream(socket);
num = socketStream.read(data);
And I always have num=0. socket.localAddress is also zero. For remoteAddress I
have an exception: "Transport endpoint is not connected.". I've tried it run on
Windows XP and all work and all addresses resolved. Also I test equal
functionality on linux with Tango (HttpGet) and all also work. So any idea
what's wrong?
Dec 20 2009
4ybaka Wrote:
Hi!
I run code like this on linux (Arch and Kubuntu 9.04):
TcpSocket socket = new TcpSocket(new InternetAddress("www.google.com", 80));
socket.send("GET /intl/en_ALL/images/logo.gif HTTP/1.0\r\n\r\n");
SocketStream socketStream = new SocketStream(socket);
num = socketStream.read(data);
And I always have num=0. socket.localAddress is also zero. For remoteAddress I
have an exception: "Transport endpoint is not connected.". I've tried it run on
Windows XP and all work and all addresses resolved. Also I test equal
functionality on linux with Tango (HttpGet) and all also work. So any idea
what's wrong?
Sorry, I forget. I used dmd 2.037
Dec 20 2009
4ybaka wrote:
Hi! I run code like this on linux (Arch and Kubuntu 9.04): TcpSocket
socket = new TcpSocket(new InternetAddress("www.google.com", 80));
socket.send("GET /intl/en_ALL/images/logo.gif HTTP/1.0\r\n\r\n");
SocketStream socketStream = new SocketStream(socket); num =
socketStream.read(data); And I always have num=0. socket.localAddress
is also zero. For remoteAddress I have an exception: "Transport
endpoint is not connected.". I've tried it run on Windows XP and all
work and all addresses resolved. Also I test equal functionality on
linux with Tango (HttpGet) and all also work. So any idea what's
wrong?
No, but if you figure it out, can you please post a patch? Also, can you
post this to bugzilla, please?
Dec 23 2009









4ybaka <4ybaka gmail.com> 