| 222 | } |
| 223 | |
| 224 | void DebuggerProxy::onClientConnected(const Valdi::Ref<Valdi::ITCPConnection>& client) { |
| 225 | if (_jsHost->ownsClient(client)) { |
| 226 | VALDI_INFO( |
| 227 | Valdi::ConsoleLogger::getLogger(), "[JSDebugger] JSCore client connected from {}", client->getAddress()); |
| 228 | client->setDataListener(Valdi::makeShared<JSDebuggerConnection>(*_externHost, *client).toShared()); |
| 229 | } else { |
| 230 | VALDI_INFO( |
| 231 | Valdi::ConsoleLogger::getLogger(), "[JSDebugger] External client connected from {}", client->getAddress()); |
| 232 | auto connection = Valdi::makeShared<ExternalDebuggerConnection>(*_jsHost, *client); |
| 233 | client->setDataListener(connection.toShared()); |
| 234 | |
| 235 | connection->submitMessageToJs(STRING_LITERAL("Setup"), STRING_LITERAL("{}")); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | void DebuggerProxy::onClientDisconnected(const Valdi::Ref<Valdi::ITCPConnection>& client, const Valdi::Error& error) { |
| 240 | if (_jsHost->ownsClient(client)) { |
nothing calls this directly
no test coverage detected