Class: OpalWebpackLoader::PipeServer
- Inherits:
-
Object
- Object
- OpalWebpackLoader::PipeServer
- Includes:
- WindowsyThings
- Defined in:
- lib/opal-webpack-loader/pipe_server.rb
Defined Under Namespace
Classes: Overlapped
Constant Summary collapse
- CONNECTING_STATE =
0- READING_STATE =
1- WRITING_STATE =
2- INSTANCES =
4- PIPE_TIMEOUT =
5000- BUFFER_SIZE =
65536
Constants included from WindowsyThings
WindowsyThings::ERROR_IO_PENDING, WindowsyThings::ERROR_PIPE_CONNECTED, WindowsyThings::ERROR_SUCCESS, WindowsyThings::FILE_FLAG_OVERLAPPED, WindowsyThings::INFINITE, WindowsyThings::INVALID_HANDLE_VALUE, WindowsyThings::PIPE_ACCESS_DUPLEX, WindowsyThings::PIPE_READMODE_BYTE, WindowsyThings::PIPE_READMODE_MESSAGE, WindowsyThings::PIPE_TYPE_BYTE, WindowsyThings::PIPE_TYPE_MESSAGE, WindowsyThings::PIPE_WAIT, WindowsyThings::QS_ALLINPUT
Instance Method Summary collapse
-
#initialize(pipe_name, instances = 4, &block) ⇒ PipeServer
constructor
A new instance of PipeServer.
- #run ⇒ Object
Constructor Details
#initialize(pipe_name, instances = 4, &block) ⇒ PipeServer
Returns a new instance of PipeServer.
63 64 65 66 67 68 69 70 |
# File 'lib/opal-webpack-loader/pipe_server.rb', line 63 def initialize(pipe_name, instances = 4, &block) @run_block = block @full_pipe_name = "\\\\.\\pipe\\#{pipe_name}" @instances = instances @events = [] @events_pointer = FFI::MemoryPointer.new(:uintptr_t, @instances) @pipes = [] end |
Instance Method Details
#run ⇒ Object
72 73 74 75 |
# File 'lib/opal-webpack-loader/pipe_server.rb', line 72 def run create_instances while_loop end |