Class: Statsy::Transport::UDP
- Inherits:
-
UDPSocket
- Object
- UDPSocket
- Statsy::Transport::UDP
- Includes:
- Interface
- Defined in:
- lib/statsy.rb
Overview
UDP transport class that writes a stat per packet connects on construction, doesn’t handle exceptions
Instance Method Summary collapse
-
#initialize(host, port) ⇒ UDP
constructor
A new instance of UDP.
- #write(stat) ⇒ Object
Constructor Details
#initialize(host, port) ⇒ UDP
Returns a new instance of UDP.
20 21 22 23 |
# File 'lib/statsy.rb', line 20 def initialize(host, port) super() connect(host, port) end |
Instance Method Details
#write(stat) ⇒ Object
25 26 27 |
# File 'lib/statsy.rb', line 25 def write(stat) send(stat, 0) end |