digitalmars.D - std.socket
- Alexander Panek (19/19) Dec 15 2004 Hello,
- Alexander Panek (5/5) Dec 15 2004 Well, I just figured out how it links correct:
-
Carlos Santander B.
(30/30)
Dec 15 2004
"Alexander Panek"
escribió en el mensaj... - Alexander Panek (10/10) Dec 15 2004 Am Thu, 16 Dec 2004 00:01:24 +0100 schrieb Alexander Panek
- Thomas Kuehne (11/18) Dec 15 2004 -----BEGIN PGP SIGNED MESSAGE-----
Hello, I just wanted to try using the socket-class and the linker just fails to find the implemention of the winsock-functions. Now I wonder how I can 'link' my program with the wsock32.dll, where *afaik* the winsock-functions are implemented. Anybody got something done with sockets before? <snip> import std.socket; int main(char [][] args) { Socket s = new Socket(AddressFamily.INET, SocketType.STREAM); return 0; } </snip> That`s my little test-program. Alex -- Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/m2/
Dec 15 2004
Well, I just figured out how it links correct: dmd <srcfile> WS2_32.lib :) -- Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/m2/
Dec 15 2004
"Alexander Panek" <alexander.panek brainsware.org> escribió en el mensaje news:opsi2nkmk4y2yy8c brainsware-01.chello.at... | Hello, | | I just wanted to try using the socket-class and the linker just fails to | find the implemention of the winsock-functions. Now I wonder how I can | 'link' my program with the wsock32.dll, where *afaik* the | winsock-functions are implemented. Anybody got something done with sockets | before? | | <snip> | import std.socket; | | int main(char [][] args) | { | Socket s = new Socket(AddressFamily.INET, SocketType.STREAM); | | return 0; | } | </snip> | | That`s my little test-program. | | Alex | | -- | Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/m2/ dmd littleTestProgram.d wsock32.lib ----------------------- Carlos Santander Bernal
Dec 15 2004
Am Thu, 16 Dec 2004 00:01:24 +0100 schrieb Alexander Panek <alexander.panek brainsware.org>: Got another problem there. I get an Access Violation when I try to read from a SocketStream using a connected socket. Also tried to use the sample-code (dmd/samples/d/htmlget.d), but the compiled program also prints the same error. What`s wrong there? I just tried to connect to "www.google.at" on port 80 and then read the stream. Alex -- Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/m2/
Dec 15 2004
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alexander Panek schrieb am Thu, 16 Dec 2004 00:28:52 +0100:Am Thu, 16 Dec 2004 00:01:24 +0100 schrieb Alexander Panek <alexander.panek brainsware.org>: Got another problem there. I get an Access Violation when I try to read from a SocketStream using a connected socket. Also tried to use the sample-code (dmd/samples/d/htmlget.d), but the compiled program also prints the same error. What`s wrong there? I just tried to connect to "www.google.at" on port 80 and then read the stream.AFAK you first have to send a GET, HEAD, ... what ever request before you can read something from a HTTP stream. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFBwSzT3w+/yD4P9tIRAi48AKCK5lFIWHUXMFUmz+SjixKzyLElKACglCnw LgWAczkbetRDjF9vRkeElHs= =9IVR -----END PGP SIGNATURE-----
Dec 15 2004