R&S SGT100A User Manual page 578

Sgma vector rf source
Table of Contents

Advertisement

®
R&S
SGT100A
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
private:
string
int
int
SockAddrStruct
HostInfoStruct * currentHostInfo;
bool
int
};
TcpClient.cpp
#include <string>
//defines structs for socket handling
#include <netinet/in.h>
using namespace std;
typedef struct sockaddr_in SockAddrStruct;
typedef struct hostent
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
private:
string
int
int
SockAddrStruct
HostInfoStruct * currentHostInfo;
bool
int
};
User Manual 1176.8674.02 ─ 07
getCurrentPort( ) const;
currentHostName;
currentPort;
currentSocketDescr;
serverAddress;
clientIsConnected;
receiveBufferSize;
HostInfoStruct;
getCurrentPort( ) const;
currentHostName;
currentPort;
currentSocketDescr;
serverAddress;
clientIsConnected;
receiveBufferSize;
Annex
Telnet program examples
547

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents