Mail Archives: djgpp/1998/01/17/17:16:25
On 17 Jan 98 21:48:20 GMT in comp.os.msdos.djgpp Calvin French
<frenchc AT cadvision DOT com> wrote:
: Well, Dan's lib just hasn't done it for me, I don't know why. I can get
: chat1/2 working just fine, but if I try something like:
: SocketInit();
: Socket* s = new Socket(...etc...);
: it will hang right then and there.
IIRC that's the normal technique. Use AF_INET, SOCK_DGRAM and
IPPROTO_UDP, or AF_INET, SOCK_STREAM and IPPROTO_TCP only -- you can't
use raw sockets, for instance.
If you want to delve more deeply into this, I can send you some very
small programs I wrote using Dan's library which definitely work with
0.93b. I assume he hasn't introduced any bugs in the latest release
;).
If you give me a bit more time I can send you a program which will
discover why the above snippet failed.
: >In addition, libnet's winsock driver will (hopefully) have this
: >functionality soon, so anyone who wants minimal code just to read IP
: >data from the registry will be free to `steal' it from libnet.
: What is libnet?
libnet is a generic networking library, whose aim is to allow people
to write networking code without needing to know exactly what type of
network their program is communicating over. At present it only has a
Winsock driver, but the IPX driver is very nearly complete. You can
download the latest version (miuns the IPX driver) from:
http://users.ox.ac.uk/~mert0407/downloads/libnet.zip
You might like to do this and see whether this Winsock code works for
you -- there might be a problem with your particular Winsock. Are you
sure it's not version 2?
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
- Raw text -