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

Method setDebugParameters

Engine/source/console/telnetDebugger.cpp:232–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void TelnetDebugger::setDebugParameters(S32 port, const char *password, bool waitForClient)
233{
234 // Don't bail if same port... we might just be wanting to change
235 // the password.
236// if(port == mAcceptPort)
237// return;
238
239 if(mAcceptSocket != NetSocket::INVALID)
240 {
241 Net::closeSocket(mAcceptSocket);
242 mAcceptSocket = NetSocket::INVALID;
243 }
244 mAcceptPort = port;
245 if(mAcceptPort != -1 && mAcceptPort != 0)
246 {
247 NetAddress address;
248 Net::getIdealListenAddress(&address);
249 address.port = mAcceptPort;
250
251 mAcceptSocket = Net::openSocket();
252 Net::bindAddress(address, mAcceptSocket);
253 Net::listen(mAcceptSocket, 4);
254
255 Net::setBlocking(mAcceptSocket, false);
256 }
257 dStrncpy(mDebuggerPassword, password, PasswordMaxLength);
258
259 mWaitForClient = waitForClient;
260 if ( !mWaitForClient )
261 return;
262
263 // Wait for the client to fully connect.
264 while ( mState != Connected )
265 {
266 Platform::sleep(10);
267 process();
268 }
269
270}
271
272void TelnetDebugger::processConsoleLine(const char *consoleLine)
273{

Callers 1

telnetDebugger.cppFile · 0.80

Calls 1

dStrncpyFunction · 0.85

Tested by

no test coverage detected