Sha256: 6bf7af87c00ad1f34bebe9ddd5064eb9967fca03c2eae22fce2602e1c3d84a71
Contents?: true
Size: 480 Bytes
Versions: 3
Compression:
Stored size: 480 Bytes
Contents
# frozen_string_literal: true module Del # A Socket server for client/server communication # overs a UNIX socket. class SocketServer def initialize(socket_file:) @connection = SocketConnection.new(path: socket_file) end def run(robot) loop do @connection.on_receive do |socket| line = socket.readline Del.logger.debug(line) socket.write(robot.execute(JSON.parse(line))) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
del-0.1.19 | lib/del/socket_server.rb |
del-0.1.18 | lib/del/socket_server.rb |
del-0.1.17 | lib/del/socket_server.rb |