diff options
Diffstat (limited to 'lib/dtas/unix_client.rb')
-rw-r--r-- | lib/dtas/unix_client.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/dtas/unix_client.rb b/lib/dtas/unix_client.rb index 1a0de90..fa94bbf 100644 --- a/lib/dtas/unix_client.rb +++ b/lib/dtas/unix_client.rb @@ -1,7 +1,7 @@ -# -*- encoding: binary -*- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) -require 'dtas' +require_relative '../dtas' +require_relative 'xs' require 'socket' require 'io/wait' require 'shellwords' @@ -9,6 +9,8 @@ require 'shellwords' class DTAS::UNIXClient # :nodoc: attr_reader :to_io + include DTAS::XS + def self.default_path (ENV["DTAS_PLAYER_SOCK"] || File.expand_path("~/.dtas/player.sock")).b end @@ -19,7 +21,7 @@ class DTAS::UNIXClient # :nodoc: end def req_start(args) - args = Shellwords.join(args) if Array === args + args = xs(args) if Array === args @to_io.send(args, Socket::MSG_EOR) end |