LLVM  4.0.0
Public Member Functions | List of all members
llvm::orc::rpc::RawByteChannel Class Referenceabstract

Interface for byte-streams to be used with RPC. More...

#include <RawByteChannel.h>

Public Member Functions

virtual ~RawByteChannel ()
 
virtual Error readBytes (char *Dst, unsigned Size)=0
 Read Size bytes from the stream into *Dst. More...
 
virtual Error appendBytes (const char *Src, unsigned Size)=0
 Read size bytes from *Src and append them to the stream. More...
 
virtual Error send ()=0
 Flush the stream if possible. More...
 
template<typename FunctionIdT , typename SequenceIdT >
Error startSendMessage (const FunctionIdT &FnId, const SequenceIdT &SeqNo)
 Notify the channel that we're starting a message send. More...
 
Error endSendMessage ()
 Notify the channel that we're ending a message send. More...
 
template<typename FunctionIdT , typename SequenceNumberT >
Error startReceiveMessage (FunctionIdT &FnId, SequenceNumberT &SeqNo)
 Notify the channel that we're starting a message receive. More...
 
Error endReceiveMessage ()
 Notify the channel that we're ending a message receive. More...
 
std::mutex & getReadLock ()
 Get the lock for stream reading. More...
 
std::mutex & getWriteLock ()
 Get the lock for stream writing. More...
 

Detailed Description

Interface for byte-streams to be used with RPC.

Definition at line 33 of file RawByteChannel.h.

Constructor & Destructor Documentation

virtual llvm::orc::rpc::RawByteChannel::~RawByteChannel ( )
inlinevirtual

Definition at line 35 of file RawByteChannel.h.

Member Function Documentation

virtual Error llvm::orc::rpc::RawByteChannel::appendBytes ( const char *  Src,
unsigned  Size 
)
pure virtual
Error llvm::orc::rpc::RawByteChannel::endReceiveMessage ( )
inline

Notify the channel that we're ending a message receive.

Unlocks the channel for reading.

Definition at line 71 of file RawByteChannel.h.

References llvm::Error::success().

Error llvm::orc::rpc::RawByteChannel::endSendMessage ( )
inline

Notify the channel that we're ending a message send.

Unlocks the channel for writing.

Definition at line 56 of file RawByteChannel.h.

References llvm::Error::success().

std::mutex& llvm::orc::rpc::RawByteChannel::getReadLock ( )
inline

Get the lock for stream reading.

Definition at line 77 of file RawByteChannel.h.

std::mutex& llvm::orc::rpc::RawByteChannel::getWriteLock ( )
inline

Get the lock for stream writing.

Definition at line 80 of file RawByteChannel.h.

virtual Error llvm::orc::rpc::RawByteChannel::readBytes ( char *  Dst,
unsigned  Size 
)
pure virtual
virtual Error llvm::orc::rpc::RawByteChannel::send ( )
pure virtual

Flush the stream if possible.

template<typename FunctionIdT , typename SequenceNumberT >
Error llvm::orc::rpc::RawByteChannel::startReceiveMessage ( FunctionIdT &  FnId,
SequenceNumberT &  SeqNo 
)
inline

Notify the channel that we're starting a message receive.

Locks the channel for reading.

Definition at line 64 of file RawByteChannel.h.

References llvm::orc::rpc::deserializeSeq().

template<typename FunctionIdT , typename SequenceIdT >
Error llvm::orc::rpc::RawByteChannel::startSendMessage ( const FunctionIdT &  FnId,
const SequenceIdT &  SeqNo 
)
inline

Notify the channel that we're starting a message send.

Locks the channel for writing.

Definition at line 49 of file RawByteChannel.h.

References llvm::orc::rpc::serializeSeq().


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