RE: [Plib-devel] Re: KobayashiMaru & plib
Brought to you by:
sjbaker
From: Ben W. <be...@bg...> - 2000-08-21 18:05:11
|
Well here is the code, but this code is going to be eventually put into plib, but right now its really messy. I have to do alot of portability code, especially for mac os, and I am not sure it will work on windows. But the code is started, hopefully if I don't have another day like today the code should be cleaner and portable. Are you interested in actually working on the code or just using it. Currently you have to create one socket per connection and I have not developed it for more then one connection. I am sure there would be little change to the interface for this to work but I have not coded for it yet. So far I was working on just a ip to ip connection, or that kind of idea, someone hosts a game and the other connects to the game. But you are left to handle the trafic and just the tcp and upd code is there for you. Later Ben the code should be attacted. Also there are alot of comments in the code for places that need to be cleaned up. If you do any work on the code please e-mail it back to me, Thanks -----Original Message----- From: Sam Stickland [mailto:sa...@sp...] Sent: Monday, August 21, 2000 2:43 PM To: pli...@li... Subject: Re: [Plib-devel] Re: KobayashiMaru & plib ----- Original Message ----- From: "Ben Woodhead" <be...@bg...> To: <pli...@li...> Sent: Monday, August 21, 2000 6:29 PM Subject: RE: [Plib-devel] Re: KobayashiMaru & plib > Hello > > I am also working on some networking code for plib, a tcp and a udp section, > perhaps we can work together on it. It's not portable to mac yet and there > are definately some places that have to be worked on but hey if your > interested let me know. Yes, that would be good. I'm using ACE (http://www.cs.wustl.edu/~schmidt/ACE.html) at the moment to make my socket and thread code portable, but ACE is a very heavy weight library (it's the foundation for TAO - a complete COBRA implementation). ACE supposedly has some very powerful network functions that I've never fully had time to look at. Take the following example: Do you create a new thread for each client that connects to the server? This would be great if you never expect to have more than about 20 clients connected, but what about 3000? You can easily become swamped in task switching overhead here. But by the same token you might not want to be single threaded. There's an optimal balance for clients per thread, and it can vary on different hardware and is of course effected by the number of CPUs. Now I'm told ACE can take a single re-enterant function and a socket that clients will try to connect on and handle all this for you. If will run tests on the hardware at runtime and automatically balance the clients per thread ratio for you. But I fear that ACE might have to much of the ivory tower approach in it for my purposes. I only ever stumbled across it when I was looking for a cross-platform socket and thread library :) Sam _______________________________________________ plib-devel mailing list pli...@li... http://lists.sourceforge.net/mailman/listinfo/plib-devel |