Mail Archives: djgpp/2000/02/04/16:47:32
thank you Richard Dawe!
Richard Dawe wrote:
>
> Hello.
>
> > For network (TCP/IP or IPX) I know that I have to a library called
> > TCP-Lib (or something to that effect)
>
> Take a look at libsocket:
>
> http://libsocket.tsx.org/
>
> or Watt-32:
>
> http://www.bgnett.no/~giva/
>
> libsocket works with Windows. Watt-32 works with DOS. I'm currently trying
> to merge Watt-32's code into libsocket, so that libsocket will run on DOS
> & Windows.
>
> > and for Modem there is something called Serial-something.
>
> bcserio? dz-something or other? I can't remember off the top of my head.
> Take a look in v2tk/ of the DJGPP archive. I know nothing about serial
> communications.
>
> > Lets say I want to write a small program that passes 3 items
> > to the other computer: angle, velocity, and the userid... how would I
> > write this???
>
> You need some kind of communications protocol. You could just send
> structures like:
>
> struct data_item {
> float angle;
> float velocity;
> uid_t user;
> };
>
> If this is running on multiple platforms (i.e. more than just DOS,
> Windows), then you might have to think about how the data is sent - big
> endian, little endian, etc.
>
> With the networking you have a choice of protocol - TCP over IP or UDP
> over IP. If you use TCP/IP, then it's possible that the whole of the above
> structure would not be sent in one packet. You may like to use UDP/IP
> instead. I recommend reading some books on TCP/IP networking programming,
> like W. Richard Stevens book on Unix Network Programming (very good book).
>
> We had a discussion on the libsocket mailing list a while back about using
> networking in a game. It may be worth looking at the libsocket mailing
> list archives - look at the mailing list page here:
>
> http://libsocket.tsx.org/
>
> > If there is a web-site about this, plz direct me to it...
>
> For BSD sockets networking, which both libsocket and Watt-32 support, take
> a look at Beej's guide:
>
> http://www.phekda.freeserve.co.uk/richdawe/lsck/beej/
>
> HTH, bye,
>
> --
> Richard Dawe
> richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/
--
***********************************************************
* Sahab Yazdani * "We are all who we are, no more and no *
* Thornhill S.S * less" - al'Lan Mandragoran *
***********************************************************
* http://pheonixware.8m.com/ *
***********************************************************
- Raw text -