Class: Openplay::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/openplay/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#portObject (readonly)

Returns the value of attribute port.



5
6
7
# File 'lib/openplay/server.rb', line 5

def port
  @port
end

Instance Method Details

#receiveObject



12
13
14
# File 'lib/openplay/server.rb', line 12

def receive
  `cvlc udp://@:#{port} --network-caching=250`
end