|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: I need help
A complete explanation would take a long time. The idea is that you create a "listening" socket by creating a socket and binding it to a port number. You then listen to the socket and every time someone else connects to the socket the listen function returns a new socket. You can then read and write data to these sockets. So, every time someone connects you get a new socket. You keep an array of open sockets and use select to check for input on the sockets. A good source of information for doing this in Java can be found at http://java.sun.com/docs/books/tutorial/networking/sockets/index.html. If you want to do it in C/C++ you'll need to look elsewhere. Most books on UNIX programming include a section on using sockets a good place to start is http://www.softlab.ntua.gr/unix/sockets.html. Windows provides the WinSock API which is simply UNIX sockets on steroids. I went to http://metacrawler.com, one of my most favorite search engines, searched for the words "socket listen bind" (without the parenthesis) and found a long list of good sites with info on socket programming. Bob P. Wyze Guy wrote: > > Would I have to enter a new line for every player connection that signs up, > or could I just set a whole mess of sockets and leave them open. Please > ewplain. > Thank you, > Dwyzeguy > > >From: Bob Pendleton <bobp@pendleton.com> > >Reply-To: gameprogrammer@gameprogrammer.com > >To: gameprogrammer@gameprogrammer.com > >Subject: Re: I need help > >Date: Mon, 20 Sep 1999 20:10:01 -0500 > > > >Learn socket programming in your favorite language. The basic APIs are: > >socket, bind, accept, connect, read, write, and close. You'll also need > >to either use multiple threads or learn to use the select API to handle > >multiple connections and asynchronous connections/disconnections. Not as > >hard as it may sound, but you really have to design for multiple players > >from the beginning. > > > > Bob P. > > > > > >Wyze Guy wrote: > > > > > > How the heck can you interface a game for on-line only playing. I've > >started > > > my project on my game and not only do i need an answer to this question, > >but > > > i need help. > > > Thanx, > > > Dwyzeguy > > > > > > ______________________________________________________ > > > Get Your Private, Free Email at http://www.hotmail.com > > > ================================================================= > > > To SUBSCRIBE or UNSUBSCRIBE please visit > > > http://gameprogrammer.com/mailinglist.html > >================================================================= > >To SUBSCRIBE or UNSUBSCRIBE please visit > >http://gameprogrammer.com/mailinglist.html > > > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > ================================================================= > To SUBSCRIBE or UNSUBSCRIBE please visit > http://gameprogrammer.com/mailinglist.html ================================================================= To SUBSCRIBE or UNSUBSCRIBE please visit http://gameprogrammer.com/mailinglist.html
|
|