MCPcopy Create free account
hub / github.com/AlexandreRouma/SDRPlusPlus / readAsync

Method readAsync

core/src/utils/networking.cpp:111–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 }
110
111 void ConnClass::readAsync(int count, uint8_t* buf, void (*handler)(int count, uint8_t* buf, void* ctx), void* ctx) {
112 if (!connectionOpen) { return; }
113 // Create entry
114 ConnReadEntry entry;
115 entry.count = count;
116 entry.buf = buf;
117 entry.handler = handler;
118 entry.ctx = ctx;
119
120 // Add entry to queue
121 {
122 std::lock_guard lck(readQueueMtx);
123 readQueue.push_back(entry);
124 }
125
126 // Notify read worker
127 readQueueCnd.notify_all();
128 }
129
130 void ConnClass::writeAsync(int count, uint8_t* buf) {
131 if (!connectionOpen) { return; }

Callers 4

SpyServerClientClassMethod · 0.80
dataHandlerMethod · 0.80
clientHandlerMethod · 0.80
dataHandlerMethod · 0.80

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected