Update of /cvsroot/playerstage/code/player/server
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21464/server
Modified Files:
Tag: release-2-0-patches
server.cc
Log Message:
increased main loop sleep to 1ms
Index: server.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/server.cc,v
retrieving revision 1.32.2.1
retrieving revision 1.32.2.2
diff -C2 -d -r1.32.2.1 -r1.32.2.2
*** server.cc 9 Jun 2006 01:17:52 -0000 1.32.2.1
--- server.cc 1 May 2007 18:08:23 -0000 1.32.2.2
***************
*** 77,80 ****
--- 77,81 ----
#include <libplayercore/playercore.h>
#include <libplayertcp/playertcp.h>
+ #include <libplayertcp/playerudp.h>
#include <libplayerxdr/functiontable.h>
#include <libplayerdrivers/driverregistry.h>
***************
*** 96,99 ****
--- 97,101 ----
PlayerTCP* ptcp;
+ PlayerUDP* pudp;
ConfigFile* cf;
***************
*** 127,130 ****
--- 129,135 ----
assert(ptcp);
+ pudp = new PlayerUDP();
+ assert(pudp);
+
if(ParseArgs(&port, &debuglevel, &cfgfilename, &gz_serverid, argc, argv) <
0)
{
***************
*** 184,188 ****
if(ptcp->Listen(ports, num_ports) < 0)
{
! PLAYER_ERROR("failed to listen on requested ports");
Cleanup();
exit(-1);
--- 189,200 ----
if(ptcp->Listen(ports, num_ports) < 0)
{
! PLAYER_ERROR("failed to listen on requested TCP ports");
! Cleanup();
! exit(-1);
! }
!
! if(pudp->Listen(ports, num_ports) < 0)
! {
! PLAYER_ERROR("failed to listen on requested UDP ports");
Cleanup();
exit(-1);
***************
*** 200,210 ****
if(ptcp->Accept(0) < 0)
{
! PLAYER_ERROR("failed while accepting new connections");
break;
}
! if(ptcp->Read(1) < 0)
{
! PLAYER_ERROR("failed while reading");
break;
}
--- 212,228 ----
if(ptcp->Accept(0) < 0)
{
! PLAYER_ERROR("failed while accepting new TCP connections");
break;
}
! if(ptcp->Read(100) < 0)
{
! PLAYER_ERROR("failed while reading from TCP clients");
! break;
! }
!
! if(pudp->Read(0) < 0)
! {
! PLAYER_ERROR("failed while reading from UDP clients");
break;
}
***************
*** 214,218 ****
if(ptcp->Write() < 0)
{
! PLAYER_ERROR("failed while reading");
break;
}
--- 232,242 ----
if(ptcp->Write() < 0)
{
! PLAYER_ERROR("failed while writing to TCP clients");
! break;
! }
!
! if(pudp->Write() < 0)
! {
! PLAYER_ERROR("failed while writing to UDP clients");
break;
}
***************
*** 230,233 ****
--- 254,258 ----
{
delete ptcp;
+ delete pudp;
player_globals_fini();
delete cf;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit