MCPcopy Create free account
hub / github.com/chen3feng/toft / IoThread

Method IoThread

system/net/socket_test.cpp:68–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67private:
68 void IoThread()
69 {
70 char buffer[1024];
71 size_t buffer_size = 1024;
72 SocketAddressInet address;
73 size_t received_size;
74 size_t sent_size;
75 while (m_listener.ReceiveFrom(buffer, buffer_size, &received_size,
76 &address)) {
77 if (!strncasecmp(buffer, "quit", 4)) {
78 break;
79 }
80 m_listener.SendTo(buffer, received_size, address, &sent_size);
81 EXPECT_EQ(received_size, sent_size);
82 }
83 }
84
85protected:
86 DatagramSocket m_listener;

Callers

nothing calls this directly

Calls 2

ReceiveFromMethod · 0.80
SendToMethod · 0.80

Tested by

no test coverage detected