Skip to content

Telepathy::Common

Inherited by Client, Server

Public Functions

Name
bool GetNextMessage(out Message message)

Protected Functions

Name
bool SendMessagesBlocking(NetworkStream stream, byte messages[][])
bool ReadMessageBlocking(NetworkStream stream, int MaxMessageSize, out byte [] content)
void ReceiveLoop(int connectionId, TcpClient client, ConcurrentQueue< Message > receiveQueue, int MaxMessageSize)
void SendLoop(int connectionId, TcpClient client, SafeQueue< byte[]> sendQueue, ManualResetEvent sendPending)

Public Attributes

Name
int ReceiveQueueCount
bool NoDelay
int MaxMessageSize
int SendTimeout
int messageQueueSizeWarning

Protected Attributes

Name
ConcurrentQueue< Message > receiveQueue

Public Functions Documentation

function GetNextMessage

inline bool GetNextMessage(
    out Message message
)

Protected Functions Documentation

function SendMessagesBlocking

static inline bool SendMessagesBlocking(
    NetworkStream stream,
    byte messages[][]
)

function ReadMessageBlocking

static inline bool ReadMessageBlocking(
    NetworkStream stream,
    int MaxMessageSize,
    out byte [] content
)

function ReceiveLoop

static inline void ReceiveLoop(
    int connectionId,
    TcpClient client,
    ConcurrentQueue< Message > receiveQueue,
    int MaxMessageSize
)

function SendLoop

static inline void SendLoop(
    int connectionId,
    TcpClient client,
    SafeQueue< byte[]> sendQueue,
    ManualResetEvent sendPending
)

Public Attributes Documentation

variable ReceiveQueueCount

int ReceiveQueueCount => receiveQueue.Count;

variable NoDelay

bool NoDelay = true;

variable MaxMessageSize

int MaxMessageSize = 16 * 1024;

variable SendTimeout

int SendTimeout = 5000;

variable messageQueueSizeWarning

static int messageQueueSizeWarning = 100000;

Protected Attributes Documentation

variable receiveQueue

ConcurrentQueue< Message > receiveQueue = new ConcurrentQueue<[Message](/Documentation/Cops%20And%20Robbers/Classes/structTelepathy_1_1Message/)>();

Updated on 22 January 2021 at 07:53:47 UTC