Module: EventMachine::Syslog::ConnectionUDP
- Included in:
- UNIX
- Defined in:
- lib/em-syslog/connection_udp.rb,
lib/em-syslog/connection_unix.rb
Overview
Our module to pass to EventMachine to handle the UDP Connection over IP Socket
Defined Under Namespace
Modules: UNIX
Instance Method Summary collapse
-
#notify_readable ⇒ Object
Should not be needed.
-
#read_packet ⇒ Object
Should not be needed.
-
#send_msg(msg) ⇒ Object
Handle no buffering just send it.
- #setup(host, port) ⇒ Object
Instance Method Details
#notify_readable ⇒ Object
Should not be needed
17 18 19 |
# File 'lib/em-syslog/connection_udp.rb', line 17 def notify_readable read_packet end |
#read_packet ⇒ Object
Should not be needed
24 25 26 27 |
# File 'lib/em-syslog/connection_udp.rb', line 24 def read_packet data, sender = @unix_connection.recvfrom( 1024) true end |
#send_msg(msg) ⇒ Object
Handle no buffering just send it
32 33 34 |
# File 'lib/em-syslog/connection_udp.rb', line 32 def send_msg( msg) send_datagram( msg, @host, @port) end |
#setup(host, port) ⇒ Object
9 10 11 12 |
# File 'lib/em-syslog/connection_udp.rb', line 9 def setup( host, port) @host = host @port = port end |