|
winss
|
A pipe instance for outbound client/server. More...
#include <pipe_instance.hpp>


Public Member Functions | |
| OutboundPipeInstance () | |
| Creates an outbound pipe instance. More... | |
| OutboundPipeInstance (const OutboundPipeInstance &)=delete | |
| No copy. More... | |
| OutboundPipeInstance (OutboundPipeInstance &&instance) | |
| Create a new outbound pipe instance and move from another. More... | |
| bool | Queue (const std::vector< char > &data) |
| Queue the data to be sent. More... | |
| bool | HasMessages () const |
| Get if the instance has messages to send. More... | |
| bool | IsWriting () const |
| Get if the instance is currently writing data. More... | |
| bool | FinishWrite () |
| Complete writing data. More... | |
| bool | Write () |
| Write the data. More... | |
| void | Read () |
| Read for write responses. More... | |
| OutboundPipeInstance & | operator= (const OutboundPipeInstance &)=delete |
| No copy. More... | |
| OutboundPipeInstance & | operator= (OutboundPipeInstance &&instance) |
| Move an outbound pipe instance to this instance. More... | |
Public Member Functions inherited from winss::PipeInstance | |
| PipeInstance () | |
| Creates a new pipe instance. More... | |
| PipeInstance (const PipeInstance &)=delete | |
| No copy. More... | |
| PipeInstance (PipeInstance &&instance) | |
| Create a new pipe instance from another. More... | |
| virtual bool | IsPendingIO () const |
| Gets if there is pending IO operations. More... | |
| virtual bool | IsConnected () const |
| Gets if the instance is connected. More... | |
| virtual bool | IsClosing () const |
| Gets if the instance is closing. More... | |
| virtual winss::HandleWrapper | GetHandle () const |
| Gets the event handle for the instance. More... | |
| virtual bool | SetConnected () |
| Sets the instance to connected state. More... | |
| virtual OverlappedResult | GetOverlappedResult () |
| Gets the last overlapped result of the instance. More... | |
| virtual bool | CreateNamedPipe (const winss::PipeName &pipe_name) |
| Creates the Windows named pipe server. More... | |
| virtual bool | CreateFile (const winss::PipeName &pipe_name) |
| Creates a Windows named pipe client. More... | |
| virtual void | Closing () |
| Marks the pipe instance as closing and triggers the event. More... | |
| virtual void | DisconnectNamedPipe () |
| DIsconnect the client from the pipe server. More... | |
| virtual bool | Close () |
| Close the pipe connection. More... | |
| PipeInstance & | operator= (const PipeInstance &)=delete |
| No copy. More... | |
| PipeInstance & | operator= (PipeInstance &&instance) |
| Move a pipe instance to this instance. More... | |
| virtual | ~PipeInstance () |
| Default destructor. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from winss::PipeInstance | |
| static const DWORD | kBufferSize = 4096 |
| The pipe buffer. More... | |
| static const DWORD | kTimeout = 5000 |
| The pipe timeout. More... | |
Protected Member Functions inherited from winss::PipeInstance | |
| bool | CheckError () |
| Checks if error is a real error or pending IO operation. More... | |
Protected Attributes inherited from winss::PipeInstance | |
| OVERLAPPED | overlapped |
| The overlapped structure. More... | |
| HANDLE | handle = nullptr |
| The event handle. More... | |
| bool | connected = false |
| Flags if the instance is connected. More... | |
| bool | pending_io = false |
| Flagged if IO event is pending. More... | |
| bool | close = false |
| Flagged if instance is closing. More... | |
| std::vector< char > | buffer |
| The instance byte buffer. More... | |
| DWORD | bytes = 0 |
| The bytes read or written. More... | |
A pipe instance for outbound client/server.
| winss::OutboundPipeInstance::OutboundPipeInstance | ( | ) |
Creates an outbound pipe instance.
|
delete |
No copy.
| winss::OutboundPipeInstance::OutboundPipeInstance | ( | winss::OutboundPipeInstance && | instance | ) |
Create a new outbound pipe instance and move from another.
| instance | The outbound pipe instance to move from. |
| bool winss::OutboundPipeInstance::FinishWrite | ( | ) |
Complete writing data.
References winss::PipeInstance::connected.
| bool winss::OutboundPipeInstance::HasMessages | ( | ) | const |
Get if the instance has messages to send.
| bool winss::OutboundPipeInstance::IsWriting | ( | ) | const |
Get if the instance is currently writing data.
|
delete |
No copy.
| winss::OutboundPipeInstance & winss::OutboundPipeInstance::operator= | ( | winss::OutboundPipeInstance && | instance | ) |
Move an outbound pipe instance to this instance.
| instance | The outbound pipe instance to move from. |
References winss::PipeInstance::operator=().
| bool winss::OutboundPipeInstance::Queue | ( | const std::vector< char > & | data | ) |
Queue the data to be sent.
| data | The data to queue. |
References winss::PipeInstance::connected, and winss::PipeInstance::kBufferSize.
| void winss::OutboundPipeInstance::Read | ( | ) |
| bool winss::OutboundPipeInstance::Write | ( | ) |
Write the data.
References winss::PipeInstance::bytes, winss::PipeInstance::CheckError(), winss::PipeInstance::connected, winss::PipeInstance::handle, winss::PipeInstance::overlapped, winss::PipeInstance::pending_io, and WINDOWS.
1.8.11