Class: BrB::Protocol

Inherits:
EventMachine show all
Defined in:
lib/brb/event_machine.rb

Class Method Summary collapse

Methods inherited from EventMachine

open, open_server

Class Method Details

.parse_uri(uri) ⇒ Object



80
81
82
83
84
85
86
# File 'lib/brb/event_machine.rb', line 80

def parse_uri(uri)
  if /^brb:\/\/(.+):([0-9]+)$/ =~ uri 
    [$1, $2.to_i]
  else
    raise "Bad tcp BrB url: '#{uri}'"
  end
end