delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/18/02:03:34

Newsgroups: comp.os.msdos.djgpp
Subject: Re: RSXNTDJ and export libs...
From: frenchc AT cadvision DOT com (Calvin French)
References: <34befb68 DOT 0 AT news DOT cadvision DOT com> <69np1a$g3m$3 AT news DOT ox DOT ac DOT uk> <34c12724 DOT 0 AT news DOT cadvision DOT com> <69ra2m$dnk$1 AT news DOT ox DOT ac DOT uk>
MIME-Version: 1.0
NNTP-Posting-Host: ts11ip134.cadvision.com
Message-ID: <34c1a538.0@news.cadvision.com>
Date: 18 Jan 98 06:46:16 GMT
Organization: CADVision Development Corporation (http://www.cadvision.com/)
Lines: 53
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019