diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-08-25 07:57:33 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-08-25 08:03:49 +0000 |
commit | 51212f0405057c03b032814677055b8ed2c4a494 (patch) | |
tree | fbd48575e39e88ff79090d9a2ea05a896cfeb882 /lib/dtas/unix_client.rb | |
parent | 09f75c61a5b4ab1b6706908786815a813ed12d8f (diff) | |
download | dtas-51212f0405057c03b032814677055b8ed2c4a494.tar.gz |
It's too much work for me to attempt to wedge SOCK_DGRAM or SOCK_STREAM support into this. SOCK_SEQPACKET is the best use of _my_ time and I have limited patience for crippled OSes. Linux has had this forever and FreeBSD 9 supports SOCK_SEQPACKET already, so maybe this will be another way to nudge developers of other OSes into supporting SOCK_SEQPACKET. If somebody can provide clean patches to support SOCK_DGRAM or SOCK_STREAM, I'll accept them.
Diffstat (limited to 'lib/dtas/unix_client.rb')
-rw-r--r-- | lib/dtas/unix_client.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/dtas/unix_client.rb b/lib/dtas/unix_client.rb index cc6bf0f..0811ad4 100644 --- a/lib/dtas/unix_client.rb +++ b/lib/dtas/unix_client.rb @@ -14,15 +14,7 @@ class DTAS::UNIXClient # :nodoc: end def initialize(path = self.class.default_path) - @to_io = begin - raise if ENV["_DTAS_NOSEQPACKET"] - Socket.new(:AF_UNIX, :SOCK_SEQPACKET, 0) - rescue - warn("get your operating system developers to support " \ - "SOCK_SEQPACKET for AF_UNIX sockets") - warn("falling back to SOCK_DGRAM, reliability possibly compromised") - Socket.new(:AF_UNIX, :SOCK_DGRAM, 0) - end + @to_io = Socket.new(:AF_UNIX, :SOCK_SEQPACKET, 0) @to_io.connect(Socket.pack_sockaddr_un(path)) end |