adapnex::core::TCPConnection

Represents a TCP connection.

Synopsis

Declared in <adapnex/core/network.h>

class TCPConnection
    : public boost::noncopyable

Description

Not thread‐safe.

Base Classes

Name Description

boost::noncopyable

Member Functions

Name

Description

~TCPConnection [destructor] [virtual]

Destructor

Close [virtual]

Closes the connection.

Connect [virtual]

Connects to the specified host and port.

Connect [virtual]

Connects to the specified IPv4 address and port.

Connected [virtual]

Checks if the connection is currently established.

Read [virtual]

Read from the connection.

Read [virtual]

Read from the connection with separate byte and total timeouts.

Reconnect [virtual]

Reconnects to the previously specified endpoint.

Write [virtual]

Write to the connection.

Static Member Functions

Name

Description

Create

Creates a TCPConnection instance. Does not connect the socket. Call one of the Connect() methods to connect.

Create

Creates a TCPConnection instance and connects to the specified IPv4 address and port.

Create

Creates a TCPConnection instance and connects to the specified host and port.

Created with MrDocs