vm_websocket.hpp (ccd584f2da1e687ea66d47824a791162458e737b) | vm_websocket.hpp (ecd6a3a20ab128ae9d3e356d6250695800dc13be) |
---|---|
1#pragma once 2 3#include <app.hpp> 4#include <boost/beast/core/flat_static_buffer.hpp> 5#include <boost/process/async_pipe.hpp> 6#include <boost/process/child.hpp> 7#include <boost/process/io.hpp> 8#include <websocket.hpp> --- 18 unchanged lines hidden (view full) --- 27 Handler(const std::string& mediaIn, boost::asio::io_context& ios) : 28 pipeOut(ios), pipeIn(ios), media(mediaIn), doingWrite(false), 29 outputBuffer(new boost::beast::flat_static_buffer<nbdBufferSize>), 30 inputBuffer(new boost::beast::flat_static_buffer<nbdBufferSize>) 31 {} 32 33 ~Handler() = default; 34 | 1#pragma once 2 3#include <app.hpp> 4#include <boost/beast/core/flat_static_buffer.hpp> 5#include <boost/process/async_pipe.hpp> 6#include <boost/process/child.hpp> 7#include <boost/process/io.hpp> 8#include <websocket.hpp> --- 18 unchanged lines hidden (view full) --- 27 Handler(const std::string& mediaIn, boost::asio::io_context& ios) : 28 pipeOut(ios), pipeIn(ios), media(mediaIn), doingWrite(false), 29 outputBuffer(new boost::beast::flat_static_buffer<nbdBufferSize>), 30 inputBuffer(new boost::beast::flat_static_buffer<nbdBufferSize>) 31 {} 32 33 ~Handler() = default; 34 |
35 Handler(const Handler&) = delete; 36 Handler(Handler&&) = delete; 37 Handler& operator=(const Handler&) = delete; 38 Handler& operator=(Handler&&) = delete; 39 |
|
35 void doClose() 36 { 37 // boost::process::child::terminate uses SIGKILL, need to send SIGTERM 38 // to allow the proxy to stop nbd-client and the USB device gadget. 39 int rc = kill(proxy.id(), SIGTERM); 40 if (rc) 41 { 42 return; --- 176 unchanged lines hidden --- | 40 void doClose() 41 { 42 // boost::process::child::terminate uses SIGKILL, need to send SIGTERM 43 // to allow the proxy to stop nbd-client and the USB device gadget. 44 int rc = kill(proxy.id(), SIGTERM); 45 if (rc) 46 { 47 return; --- 176 unchanged lines hidden --- |