Mail Archives: djgpp/1998/01/18/02:03:34
>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.
This works:
SocketInit();
Socket s (AF_INET, SOCK_STREAM, IPPROTO_TCP);
This doesn't:
SocketInit();
Socket* s = new Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
>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
>;).
This would be very useful indeed, I could try them out and see if there is a
problem somewhere else. Feel free to email them to me whenever you have the
time, I'd really appreciate it...
>If you give me a bit more time I can send you a program which will
>discover why the above snippet failed.
Really? If it isn't too much to ask could you perhaps make a more generic
version of this program? (j/k tee hee)
>: 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?
I will try this out; if it works for me I would be quite happy. As far as I
am concerned, the simpler the better. Right now the only actual network code
I need to write is (period) is:
1 - class which represents a connection between client-server.
2 - class which transfers a variable-sized package from a-to-b,
3 - class which transfers a large ``file'' from a-to-b
NO protocol stuff, protocol is evil and I'm too clever for it (hehe)...
- Calvin -
- Raw text -