![]() |
PIP 5.6.1
Platform-Independent Primitives
|
Active client connection that initiates a connection to a server. Client implementation for connecting to servers. Provides TCP connection to remote server with diagnostics and packet streaming support. More...
#include <piclientserver_client.h>

Public Member Functions | |
| Client () | |
| Constructs a client ready to connect to a remote server. | |
| ~Client () | |
| Destroys the client and closes its connection if needed. | |
| void | connect (PINetworkAddress addr) |
| Connects to the server at address "addr". | |
Public Member Functions inherited from PIClientServer::ClientBase | |
| ClientBase () | |
| Constructs a disconnected client connection object. | |
| virtual | ~ClientBase () |
| Destroys the client connection and releases owned resources. | |
| const PIEthernet * | getTCP () const |
| Returns the underlying TCP transport object. | |
| void | close () |
| Closes the connection immediately. | |
| void | stopAndWait () |
| Stops the connection workflow and waits until shutdown completes. | |
| int | write (const void *d, const size_t s) |
| Sends raw payload bytes through the stream packer. | |
| int | write (const PIByteArray &ba) |
| Sends payload stored in "ba". | |
| void | enableDiagnostics () |
| Enables connection diagnostics collection. | |
| PIDiagnostics::State | diagnostics () const |
| Returns a snapshot of current diagnostics counters. | |
| int | receivePacketProgress () const |
| Returns how many payload bytes of the current packet are already received (all bytes count passed in receivePacketStart()). | |
| const PIStreamPackerConfig & | configuration () const |
| Returns the current packet framing configuration. | |
| PIStreamPackerConfig & | configuration () |
| Returns the current packet framing configuration for modification. | |
| void | setConfiguration (const PIStreamPackerConfig &config) |
| Replaces the packet framing configuration. | |
Additional Inherited Members | |
Protected Member Functions inherited from PIClientServer::ClientBase | |
| virtual void | readed (PIByteArray data) |
| Called when a full payload packet is received. | |
| virtual void | connected () |
| Called after the TCP connection becomes active. | |
| virtual void | disconnected () |
| Called after the connection is closed. | |
| virtual void | receivePacketStart (int size) |
| Called when reception of a new packet starts. | |
| virtual void | receivePacketEnd () |
| Called when reception of the current packet finishes. | |
Active client connection that initiates a connection to a server. Client implementation for connecting to servers. Provides TCP connection to remote server with diagnostics and packet streaming support.