MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / makeRequest

Method makeRequest

Engine/source/platform/test/netTest.cpp:136–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 }
135
136 void makeRequest()
137 {
138 mSocket = NetSocket::INVALID;
139 mDataReceived = 0;
140
141 // Hook into the signals.
142 Net::smConnectionNotify .notify(this, &JournalHandle::notify);
143 Net::smConnectionReceive.notify(this, &JournalHandle::receive);
144
145 // Open a TCP connection to garagegames.com
146 mSocket = Net::openConnectTo("72.246.107.193:80");
147
148 // Let the callbacks enable things to process.
149 while(Process::processEvents()) {}
150
151 // Unhook from the signals.
152 Net::smConnectionNotify .remove(this, &JournalHandle::notify);
153 Net::smConnectionReceive.remove(this, &JournalHandle::receive);
154
155 EXPECT_GT(mDataReceived, 0)
156 << "Didn't get any data back!";
157 }
158};
159
160TEST(Net, JournalTCPRequest)

Callers 1

TESTFunction · 0.80

Calls 2

notifyMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected