STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(Remote)(IN_BSTR aRemote) { LogRelFlow(("{%p} %s: enter aRemote=%ls\n", this, "HostUSBDeviceFilter::setRemote", aRemote)); VirtualBoxBase::clearError(); HRESULT hrc; try { AutoCaller autoCaller(this); if (FAILED(autoCaller.rc())) throw autoCaller.rc(); hrc = setRemote(BSTRInConverter(aRemote).str()); } catch (HRESULT hrc2) { hrc = hrc2; } catch (...) { hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS); } LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setRemote", hrc)); return hrc; }
UdpSocket::UdpSocket(unsigned short local_port, const std::string& ip, unsigned short port) { #ifdef _WIN32 winsock_init(); #endif init(local_port); setRemote(ip, port); }
void InstanceImpl::start() { env().logInfo( "Start FreeAX25_TCPServer::InstanceImpl(" + m_instance_descriptor.getName() + ")"); auto cep = m_instance_descriptor.clientEndPoints.findEntryConst("uplink"); string url = cep.getUrl(); auto broker = env().serverProxies.findEntry(url); if (!broker) throw runtime_error("Not found: \"" + url + "\""); setRemote(m_broker, broker); // Start thread: m_thread = thread{&InstanceImpl::_run, this}; }
void Robot::handleRequest(MessageASIO::Message& aMessage) { std::istringstream body(aMessage.getBody()); std::string type; auto& world = RobotWorld::getRobotWorld(); body >> type; if (type == "goal") { int x, y; std::string name; body >> x >> y >> name; auto goal = world.newGoal(name, Point(x, y)); goal->setRemote(); } else if (type == "waypoint") {
void SessionImpl::start(ChannelProxy broker, SocketIO::Socket&& socket) { ChannelProxy uplink = broker.connect(m_uplink.getLocalProxy()); m_uplink.closeFunction = [this](std::unique_ptr<JsonX::Object>&& parameter) { onUplinkClose(move(parameter)); }; m_uplink.receiveFunction = [this](unique_ptr<JsonX::Object>&& parameter, MessagePriority priority) { onUplinkReceive(move(parameter), priority); }; m_uplink.ctrlFunction = [this](unique_ptr<JsonX::Object>&& parameter) { return onUplinkCtrl(move(parameter)); }; setRemote(m_uplink, uplink); m_socket = move(socket); m_buffer.resize(m_instance.bufsize()); // Start thread: m_thread = thread{&SessionImpl::_run, this}; }