Class: Utils::UNIXServerExt Private
- Extended by:
- T::Generic
- Defined in:
- utils/socket.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Wrapper around UNIXServer to allow > 104 characters on macOS.
Constant Summary collapse
- Elem =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
type_member(:out) { { fixed: String } }
Instance Attribute Summary collapse
- #path ⇒ String readonly private
Instance Method Summary collapse
- #accept_nonblock ⇒ UNIXSocket private
- #initialize(path) ⇒ void constructor private
Constructor Details
#initialize(path) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
41 42 43 44 45 46 |
# File 'utils/socket.rb', line 41 def initialize(path) super(:UNIX, :STREAM) bind(UNIXSocketExt.sockaddr_un(path)) listen(Socket::SOMAXCONN) @path = path end |
Instance Attribute Details
#path ⇒ String (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
38 39 40 |
# File 'utils/socket.rb', line 38 def path @path end |
Instance Method Details
#accept_nonblock ⇒ UNIXSocket
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
49 50 51 52 53 |
# File 'utils/socket.rb', line 49 def accept_nonblock socket, = super socket.autoclose = false # Transfer autoclose responsibility to UNIXSocket UNIXSocket.for_fd(socket.fileno) end |