module SysLogger::Creators

Public Class Methods

unix_dgram_socket(socket_path) click to toggle source
# File lib/syslogger/creators.rb, line 6
def self.unix_dgram_socket(socket_path)
  proc {
    client = Socket.new(Socket::Constants::AF_LOCAL, Socket::Constants::SOCK_DGRAM, 0)
    client.connect(Socket.pack_sockaddr_un(socket_path))
    client
  }
end
unix_stream_socket(socket_path) click to toggle source
# File lib/syslogger/creators.rb, line 14
def self.unix_stream_socket(socket_path)
  proc {
    UNIXSocket.new(socket_path)
  }
end