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

Method setTelnetParameters

Engine/source/console/telnetConsole.cpp:109–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void TelnetConsole::setTelnetParameters(S32 port, const char *telnetPassword, const char *listenPassword, bool remoteEcho)
110{
111 if(port == mAcceptPort)
112 return;
113
114 mRemoteEchoEnabled = remoteEcho;
115
116 if(mAcceptSocket != NetSocket::INVALID)
117 {
118 Net::closeSocket(mAcceptSocket);
119 mAcceptSocket = NetSocket::INVALID;
120 }
121 mAcceptPort = port;
122 if(mAcceptPort != -1 && mAcceptPort != 0)
123 {
124 NetAddress address;
125 Net::getIdealListenAddress(&address);
126 address.port = mAcceptPort;
127
128 mAcceptSocket = Net::openSocket();
129 Net::bindAddress(address, mAcceptSocket);
130 Net::listen(mAcceptSocket, 4);
131
132 Net::setBlocking(mAcceptSocket, false);
133 }
134 dStrncpy(mTelnetPassword, telnetPassword, PasswordMaxLength);
135 dStrncpy(mListenPassword, listenPassword, PasswordMaxLength);
136}
137
138void TelnetConsole::processConsoleLine(const char *consoleLine)
139{

Callers 1

telnetConsole.cppFile · 0.80

Calls 1

dStrncpyFunction · 0.85

Tested by

no test coverage detected