omegalib
13.1
|
Represents a connection between the cache service and a remote cache manager. More...
#include <AssetCacheService.h>
Public Member Functions | |
AssetCacheConnection (ConnectionInfo ci, AssetCacheService *server) | |
virtual void | handleData () |
virtual void | handleClosed () |
virtual void | handleConnected () |
Connection events. More... | |
void | sendMessage (const char *header, void *data, int size) |
Public Member Functions inherited from omicron::TcpConnection | |
TcpConnection (const ConnectionInfo &ci) | |
virtual | ~TcpConnection () |
void | handle_connect (const asio::error_code &error) |
tcp::socket & | getSocket () |
Connection properties. More... | |
ConnectionState | getState () |
Gets the connection state. More... | |
const ConnectionInfo & | getConnectionInfo () |
Gets the connection info object. More... | |
bool | poll () |
Connection management. More... | |
void | close () |
Forces a connection close. More... | |
void | waitClose () |
Waits for the other end to close the connection. More... | |
void | open (const String &host, int port) |
Opens a connection to a server. More... | |
void | write (const String &data) |
Data IO Note: all the write methods are blocking: they return only when the data has been fully written to the internal buffers. More... | |
void | write (void *data, size_t size) |
Writes a buffer to the connection stream. More... | |
size_t | readUntil (void *buffer, size_t size, char delimiter= '\0') |
Synchronously read byte data until the specified delimiter is found or the buffer fills up. More... | |
size_t | read (void *buffer, size_t size) |
Synchronously read thre specified number of bytes from the stream. More... | |
size_t | availableBytes () |
Returns the number of bytes available to be read. More... | |
virtual void | handleError (const ConnectionError &err) |
Public Member Functions inherited from omicron::ReferenceType | |
ReferenceType () | |
virtual | ~ReferenceType () |
void | ref () |
void | unref () |
long | refCount () |
Additional Inherited Members | |
Public Types inherited from omicron::TcpConnection | |
enum | ConnectionState { ConnectionListening, ConnectionOpen, ConnectionClosed } |
Static Public Member Functions inherited from omicron::ReferenceType | |
static void | printObjCounts () |
Protected Member Functions inherited from omicron::TcpConnection | |
void | doHandleConnected () |
Protected Attributes inherited from omicron::TcpConnection | |
String | myHost |
int | myPort |
ConnectionInfo | myConnectionInfo |
ConnectionState | myState |
tcp::socket | mySocket |
asio::streambuf | myInputBuffer |
Static Protected Attributes inherited from omicron::ReferenceType | |
static List< ReferenceType * > | mysObjList |
Represents a connection between the cache service and a remote cache manager.
The connection is used to check what files are in the cache, and to send updated / missing files to the cache.
omicron::AssetCacheConnection::AssetCacheConnection | ( | ConnectionInfo | ci, |
AssetCacheService * | server | ||
) |
|
virtual |
Reimplemented from omicron::TcpConnection.
|
virtual |
Connection events.
Reimplemented from omicron::TcpConnection.
|
virtual |
Reimplemented from omicron::TcpConnection.
void omicron::AssetCacheConnection::sendMessage | ( | const char * | header, |
void * | data, | ||
int | size | ||
) |