MCPcopy Create free account
hub / github.com/LUX-Core/lux / ChannelData

Method ChannelData

src/cryptopp/ida.cpp:98–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void RawIDA::ChannelData(word32 channelId, const byte *inString, size_t length, bool messageEnd)
99{
100 int i = InsertInputChannel(channelId);
101 if (i < m_threshold)
102 {
103 lword size = m_inputQueues[i].MaxRetrievable();
104 m_inputQueues[i].Put(inString, length);
105 if (size < 4 && size + length >= 4)
106 {
107 m_channelsReady++;
108 if (m_channelsReady == size_t(m_threshold))
109 ProcessInputQueues();
110 }
111
112 if (messageEnd)
113 {
114 m_inputQueues[i].MessageEnd();
115 if (m_inputQueues[i].NumberOfMessages() == 1)
116 {
117 m_channelsFinished++;
118 if (m_channelsFinished == size_t(m_threshold))
119 {
120 m_channelsReady = 0;
121 for (i=0; i<m_threshold; i++)
122 m_channelsReady += m_inputQueues[i].AnyRetrievable();
123 ProcessInputQueues();
124 }
125 }
126 }
127 }
128}
129
130lword RawIDA::InputBuffered(word32 channelId) const
131{

Callers 1

Put2Method · 0.80

Calls 5

MessageEndMethod · 0.80
NumberOfMessagesMethod · 0.80
AnyRetrievableMethod · 0.80
MaxRetrievableMethod · 0.45
PutMethod · 0.45

Tested by

no test coverage detected