top | up | prev | next

FiberConnection Class

Definition at line 35 of FiberConnection.hpp

Constructors

FiberConnection(Log* log)

Member Functions

void DoClose() override
std::unique_ptr<JsonObject> DoReceive() override
void DoSend(JsonObject* messageObject) override
const std::string& GetActor() const override
Host* GetHost() const override
void SetFibers(void* serverFiber, void* clientFiber)
void Switch()

Member Variables

FiberClient client
void* clientFiber
void* currentFiber
std::string messageStr
FiberServer server
void* serverFiber

Constructor Details

FiberConnection Constructor

cmajor::build::FiberConnection::FiberConnection(Log * log)

Definition at line 40 of FiberConnection.cpp :
 40 : Connection(log)serverFiber(nullptr)clientFiber(nullptr)currentFiber(nullptr)client()server()
 41 {
 42 }


Declaration at line 38 of FiberConnection.hpp


Member Function Details

DoClose Member Function

void cmajor::build::FiberConnection::DoClose() override

Definition at line 126 of FiberConnection.cpp :
127 {
128 }


Declaration at line 43 of FiberConnection.hpp

Base class overridden functions: cmajor::build::Connection::DoClose


DoReceive Member Function

std::unique_ptr<JsonObject> cmajor::build::FiberConnection::DoReceive() override

Definition at line 110 of FiberConnection.cpp
Declaration at line 42 of FiberConnection.hpp

Base class overridden functions: cmajor::build::Connection::DoReceive

Calls: cmajor::build::FiberConnection::Switch


DoSend Member Function

void cmajor::build::FiberConnection::DoSend(JsonObject* messageObject) override

Definition at line 97 of FiberConnection.cpp
Declaration at line 41 of FiberConnection.hpp

Base class overridden functions: cmajor::build::Connection::DoSend

Calls: cmajor::build::FiberConnection::Switch


GetActor Member Function

const std::string& cmajor::build::FiberConnection::GetActor() const override

Definition at line 73 of FiberConnection.cpp :
 74 {
 75     if (currentFiber == clientFiber)
 76     {
 77         return client.Name();
 78     }
 79     else
 80     {
 81         return server.Name();
 82     }
 83 }


Declaration at line 45 of FiberConnection.hpp

Base class overridden functions: cmajor::build::Connection::GetActor

Calls: cmajor::build::FiberClient::Name , cmajor::build::FiberServer::Name


GetHost Member Function

Host * cmajor::build::FiberConnection::GetHost() const override

Definition at line 85 of FiberConnection.cpp :
 86 {
 87     if (currentFiber == clientFiber)
 88     {
 89         return const_cast<FiberClient*>(&client);
 90     }
 91     else
 92     {
 93         return const_cast<FiberServer*>(&server);
 94     }
 95 }


Declaration at line 46 of FiberConnection.hpp

Base class overridden functions: cmajor::build::Connection::GetHost


SetFibers Member Function

void cmajor::build::FiberConnection::SetFibers(void * serverFiber, void * clientFiber)

Definition at line 52 of FiberConnection.cpp :
 53 {
 54     this->serverFiber = serverFiber;
 55     this->clientFiber = clientFiber;
 56     currentFiber = serverFiber;
 57 }


Declaration at line 40 of FiberConnection.hpp


Switch Member Function

void cmajor::build::FiberConnection::Switch()

Definition at line 59 of FiberConnection.cpp
Declaration at line 44 of FiberConnection.hpp

Called by: cmajor::build::FiberConnection::DoReceive , cmajor::build::FiberConnection::DoSend


top | up | prev | next