Class: IRuby::SessionAdapter::CztopAdapter
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseAdapter
available?, #initialize, #make_pub_socket, #make_rep_socket, #make_router_socket, #name
Class Method Details
.load_requirements ⇒ Object
4
5
6
|
# File 'lib/iruby/session_adapter/cztop_adapter.rb', line 4
def self.load_requirements
require 'cztop'
end
|
Instance Method Details
#heartbeat_loop(sock) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/iruby/session_adapter/cztop_adapter.rb', line 16
def heartbeat_loop(sock)
loop do
message = sock.receive
sock << message
end
end
|
#recv(sock) ⇒ Object
12
13
14
|
# File 'lib/iruby/session_adapter/cztop_adapter.rb', line 12
def recv(sock)
sock.receive
end
|
#send(sock, data) ⇒ Object
8
9
10
|
# File 'lib/iruby/session_adapter/cztop_adapter.rb', line 8
def send(sock, data)
sock << data
end
|