From d534a56d95bca7bdd812be024d9eacba4734e2b7 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 9 Nov 2012 17:20:11 +0000 Subject: Many changes: tabconv'd the C++ code, added a license, BSD, and docs. --- c++-libbu++/src/gatscon/clientthread.cpp | 43 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 18 deletions(-) (limited to 'c++-libbu++/src/gatscon/clientthread.cpp') diff --git a/c++-libbu++/src/gatscon/clientthread.cpp b/c++-libbu++/src/gatscon/clientthread.cpp index 4c7b72a..4032a50 100644 --- a/c++-libbu++/src/gatscon/clientthread.cpp +++ b/c++-libbu++/src/gatscon/clientthread.cpp @@ -1,13 +1,20 @@ +/* + * Copyright (C) 2007-2012 Xagasoft, All rights reserved. + * + * This file is part of the libgats library and is released under the + * terms of the license contained in the file LICENSE. + */ + #include "clientthread.h" #include ClientThread::ClientThread( QObject *pParent, const QByteArray &baHost, - int iPort ) : - QThread( pParent ), - baHost( baHost ), - iPort( iPort ), - gsCli( ssCli ) + int iPort ) : + QThread( pParent ), + baHost( baHost ), + iPort( iPort ), + gsCli( ssCli ) { } @@ -17,22 +24,22 @@ ClientThread::~ClientThread() void ClientThread::send( Gats::Object *pObj ) { - gsCli.writeObject( pObj ); + gsCli.writeObject( pObj ); } void ClientThread::run() { - ssCli.setStream( - new Bu::TcpSocket( baHost.constData(), iPort ) - ); - - while( !ssCli.isEos() ) - { - Gats::Object *pObj = gsCli.readObject(); - if( pObj == NULL ) - continue; - - emit recv( pObj ); - } + ssCli.setStream( + new Bu::TcpSocket( baHost.constData(), iPort ) + ); + + while( !ssCli.isEos() ) + { + Gats::Object *pObj = gsCli.readObject(); + if( pObj == NULL ) + continue; + + emit recv( pObj ); + } } -- cgit v1.2.3