ue runs again on exmimo2 (but does not connect yet) added openair0_reconfig function in exmimo2 library added sensing thread for SPECTRA in lte-softmodem (protected by #ifdef SPECTRA) added Rohde and Schwarz client git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5780 818b1a75-f10b-46b9-bf7c-635c3b92a50f
36 lines
808 B
C++
36 lines
808 B
C++
#include <string>
|
|
|
|
//defines structs for socket handling
|
|
#include <netinet/in.h>
|
|
|
|
|
|
using namespace std;
|
|
|
|
typedef struct sockaddr_in SockAddrStruct;
|
|
typedef struct hostent HostInfoStruct;
|
|
|
|
class TcpClient
|
|
{
|
|
public:
|
|
TcpClient();
|
|
~TcpClient();
|
|
|
|
void connectToServer( string &hostname, int port );
|
|
void disconnect( );
|
|
void transmit( string &txString );
|
|
void receive( string &rxString );
|
|
|
|
string getCurrentHostName( ) const;
|
|
int getCurrentPort( ) const;
|
|
|
|
private:
|
|
string currentHostName;
|
|
int currentPort;
|
|
int currentSocketDescr;
|
|
SockAddrStruct serverAddress;
|
|
HostInfoStruct * currentHostInfo;
|
|
bool clientIsConnected;
|
|
|
|
int receiveBufferSize;
|
|
};
|