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

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

#include "llvm/ExecutionEngine/Orc/RawByteChannel.h"

Public Member Functions

virtual ~RawByteChannel ()=default
 
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 27 of file RawByteChannel.h.

Constructor & Destructor Documentation

◆ ~RawByteChannel()

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

Member Function Documentation

◆ appendBytes()

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

◆ endReceiveMessage()

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 73 of file RawByteChannel.h.

References llvm::Error::success().

◆ endSendMessage()

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 54 of file RawByteChannel.h.

References llvm::Error::success().

◆ getReadLock()

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

Get the lock for stream reading.

Definition at line 79 of file RawByteChannel.h.

◆ getWriteLock()

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

Get the lock for stream writing.

Definition at line 82 of file RawByteChannel.h.

◆ readBytes()

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

◆ send()

virtual Error llvm::orc::rpc::RawByteChannel::send ( )
pure virtual

Flush the stream if possible.

◆ startReceiveMessage()

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 62 of file RawByteChannel.h.

References llvm::orc::rpc::deserializeSeq(), and llvm::Error::success().

◆ startSendMessage()

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 43 of file RawByteChannel.h.

References llvm::orc::rpc::serializeSeq(), and llvm::Error::success().


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