OpenJAUS SAE SDK  6.0.0
Public Member Functions | Private Attributes | Friends | List of all members
openjaus::system::StreamSocket Class Reference

This is a brief description. More...

#include <StreamSocket.h>

Inherits openjaus::system::Socket.

Public Member Functions

 StreamSocket ()
 
virtual ~StreamSocket ()
 
 StreamSocket (InetAddress ipAddress, short port)
 
StreamSocketaccept ()
 
bool listenOn (InetAddress ipAddress, short port)
 Operation listenOn. More...
 
bool connectTo (InetAddress address, short port)
 Operation connectTo. More...
 
int send (Packet &packet)
 Operation send. More...
 
int receive (Packet &packet)
 Operation receive. More...
 
bool reuseAddress (bool enabled)
 Operation reuseAddress. More...
 
virtual std::string toString () const
 
- Public Member Functions inherited from openjaus::system::Socket
 Socket ()
 
virtual ~Socket ()
 
bool isBlocking () const
 Accessor to get the value of blocking. More...
 
uint16_t getPort () const
 Accessor to get the value of port. More...
 
int getDescriptor () const
 Accessor to get the value of descriptor. More...
 
const InetAddressgetIpAddress () const
 Accessor to get the value of ipAddress. More...
 
const TimegetTimeout () const
 Accessor to get the value of timeout. More...
 
bool setTimeout (const Time &timeout)
 Accessor to set value of timeout. More...
 
const std::vector< NetworkInterface *> & getInterfaces () const
 Accessor to get the value of interfaces. More...
 
void readInterfaces ()
 Operation readInterfaces. More...
 
bool isLocalAddress (const InetAddress &ipAddress)
 Operation isLocalAddress. More...
 
uint64_t addressHash ()
 Operation addressHash. More...
 

Private Attributes

MemoryBlock tempReceiveBuffer
 
MemoryBlock tempSendBuffer
 

Friends

OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const StreamSocket &object)
 
OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const StreamSocket *object)
 

Additional Inherited Members

- Static Public Member Functions inherited from openjaus::system::Socket
static std::vector< NetworkInterfacelookupInterfaces ()
 
- Static Protected Member Functions inherited from openjaus::system::Socket
static void initialize ()
 
static void deinitialize ()
 
- Protected Attributes inherited from openjaus::system::Socket
bool blocking
 
uint16_t port
 
int descriptor
 
InetAddress ipAddress
 
Time timeout
 
std::vector< NetworkInterface *> interfaces
 
- Static Protected Attributes inherited from openjaus::system::Socket
static int descriptorCount = 0
 

Detailed Description

Detailed description.

Author
Name (name@.nosp@m.emai.nosp@m.l.com)

Constructor & Destructor Documentation

◆ StreamSocket() [1/2]

openjaus::system::StreamSocket::StreamSocket ( )

◆ ~StreamSocket()

openjaus::system::StreamSocket::~StreamSocket ( )
virtual

◆ StreamSocket() [2/2]

openjaus::system::StreamSocket::StreamSocket ( InetAddress  ipAddress,
short  port 
)

Member Function Documentation

◆ accept()

StreamSocket * openjaus::system::StreamSocket::accept ( )

◆ connectTo()

bool openjaus::system::StreamSocket::connectTo ( InetAddress  address,
short  port 
)
Parameters
address
port

◆ listenOn()

bool openjaus::system::StreamSocket::listenOn ( InetAddress  ipAddress,
short  port 
)
Parameters
ipAddress
port

◆ receive()

int openjaus::system::StreamSocket::receive ( Packet packet)
virtual
Parameters
packet

Implements openjaus::system::Socket.

◆ reuseAddress()

bool openjaus::system::StreamSocket::reuseAddress ( bool  enabled)
Parameters
enabled

◆ send()

int openjaus::system::StreamSocket::send ( Packet packet)
virtual
Parameters
packet

Implements openjaus::system::Socket.

◆ toString()

std::string openjaus::system::StreamSocket::toString ( ) const
virtual

Reimplemented from openjaus::system::Socket.

Friends And Related Function Documentation

◆ operator<< [1/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const StreamSocket object 
)
friend

◆ operator<< [2/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const StreamSocket object 
)
friend

Member Data Documentation

◆ tempReceiveBuffer

MemoryBlock openjaus::system::StreamSocket::tempReceiveBuffer
private

◆ tempSendBuffer

MemoryBlock openjaus::system::StreamSocket::tempSendBuffer
private

The documentation for this class was generated from the following files: