Class: MEE::RFC5424::SyslogClient
- Inherits:
-
Object
- Object
- MEE::RFC5424::SyslogClient
- Defined in:
- lib/mee/rfc5424.rb
Instance Attribute Summary collapse
-
#framing ⇒ Object
Returns the value of attribute framing.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#transport ⇒ Object
Returns the value of attribute transport.
Instance Method Summary collapse
-
#initialize(transport, opts = {}) ⇒ SyslogClient
constructor
A new instance of SyslogClient.
- #message(body) ⇒ Object
Constructor Details
#initialize(transport, opts = {}) ⇒ SyslogClient
Returns a new instance of SyslogClient.
47 48 49 50 51 |
# File 'lib/mee/rfc5424.rb', line 47 def initialize( transport, opts = {} ) self.transport = transport self.framing = opts[:framing] || OctetFraming.new self. = Meta.new end |
Instance Attribute Details
#framing ⇒ Object
Returns the value of attribute framing.
45 46 47 |
# File 'lib/mee/rfc5424.rb', line 45 def framing @framing end |
#meta ⇒ Object
Returns the value of attribute meta.
45 46 47 |
# File 'lib/mee/rfc5424.rb', line 45 def end |
#transport ⇒ Object
Returns the value of attribute transport.
45 46 47 |
# File 'lib/mee/rfc5424.rb', line 45 def transport @transport end |
Instance Method Details
#message(body) ⇒ Object
53 54 55 56 57 58 |
# File 'lib/mee/rfc5424.rb', line 53 def ( body ) header = .header = header + body wire_payload = framing.frame( ) transport.send_frame( wire_payload ) end |