Class: Openplay::Server
- Inherits:
-
Object
- Object
- Openplay::Server
- Defined in:
- lib/openplay/server.rb
Instance Attribute Summary collapse
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(port = 5003) ⇒ Server
constructor
A new instance of Server.
- #receive ⇒ Object
Constructor Details
#initialize(port = 5003) ⇒ Server
Returns a new instance of Server.
7 8 9 10 |
# File 'lib/openplay/server.rb', line 7 def initialize(port=5003) @port = port announce_availability end |
Instance Attribute Details
#port ⇒ Object (readonly)
Returns the value of attribute port.
5 6 7 |
# File 'lib/openplay/server.rb', line 5 def port @port end |
Instance Method Details
#receive ⇒ Object
12 13 14 |
# File 'lib/openplay/server.rb', line 12 def receive `cvlc udp://@:#{port} --network-caching=250` end |