KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
SocketClientTransport Class Reference

A transport protocol that connects as a client to the given address. More...

#include <AsyncIO.h>

Inheritance diagram for SocketClientTransport:
TransportBase

Public Member Functions

 SocketClientTransport (const char *addr)
 Opens a new client socket on the given address.
 
 SocketClientTransport (const char *addr, SOCKET socket)
 Initializes with an already open socket.
 
virtual bool ReadReady ()
 Subclasses – can the object read?
 
virtual bool WriteReady ()
 Subclasses – can the object write?
 
virtual bool Start ()
 Subclasses – can the object read?
 
virtual bool Stop ()
 
virtual const std::string * DoRead ()
 Reads a string (4 byte length + data). Note: blocking.
 
virtual bool DoWrite (const char *str, int length)
 Writes a string (4 byte length + data). Note: blocking.
 
- Public Member Functions inherited from TransportBase
virtual bool DoWrite (const char *msg)
 
virtual bool DoWrite (const std::string &msg)
 

Public Attributes

std::string addr
 
File socket
 
Mutex mutex
 
std::string buf
 

Detailed Description

A transport protocol that connects as a client to the given address.


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