about summary refs log tree commit homepage
path: root/lib/rainbows/acceptor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/acceptor.rb')
-rw-r--r--lib/rainbows/acceptor.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/rainbows/acceptor.rb b/lib/rainbows/acceptor.rb
deleted file mode 100644
index c67bf20..0000000
--- a/lib/rainbows/acceptor.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- encoding: binary -*-
-
-# :enddoc:
-require 'fcntl'
-
-# this should make life easier for Zbatery if compatibility with
-# fcntl-crippled platforms is required (or if FD_CLOEXEC is inherited)
-# and we want to microptimize away fcntl(2) syscalls.
-module Rainbows::Acceptor
-
-  # returns nil if accept fails
-  def sync_accept(sock)
-    rv = sock.accept
-    rv.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
-    rv
-  rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EINTR
-  end
-
-  # returns nil if accept fails
-  def accept(sock)
-    rv = sock.accept_nonblock
-    rv.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
-    rv
-  rescue Errno::EAGAIN, Errno::ECONNABORTED
-  end
-end