Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mmorpgclient.cpp File Reference
#include "command.h"
#include "mmorpgclient.h"
#include "SDL/SDL.h"
#include "SDL_thread.h"
#include "vegastrike.h"
#include "vs_globals.h"
#include "networking/inet.h"

Go to the source code of this file.

Classes

class  POSpack
 

Functions

int startThread (void *mmoc2use)
 

Function Documentation

int startThread ( void *  mmoc2use)

Definition at line 263 of file mmorpgclient.cpp.

References mmoc::cl, CommandInterpretor, RText::conoutf(), mmoc::csay, mmoc::getSocket(), mmoc::getStatus(), mmoc::listenThread(), and commandI::remCommand().

Referenced by mmoc::createThread().

264 {
265  //{{{
266  mmoc *looper = reinterpret_cast< mmoc* > (mmoc2use);
267  if ( !looper->getStatus( 0 ) ) looper->getStatus( 1 );
268  CommandInterpretor->conoutf( "Connected." );
269  while ( looper->listenThread() )
270  ;
271  ::close( looper->getSocket() );
272  CommandInterpretor->remCommand( looper->csay );
273  CommandInterpretor->remCommand( looper->cl );
274  CommandInterpretor->conoutf( "Closed" );
275  if ( looper->getStatus( 0 ) ) looper->getStatus( 1 );
276  return 0;
277 } //}}}