Class: DRb::DRbWebSocket::ServerSide
- Inherits:
-
Object
- Object
- DRb::DRbWebSocket::ServerSide
- Defined in:
- lib/drb/drb_websocket.rb
Instance Attribute Summary collapse
-
#reply ⇒ Object
readonly
Returns the value of attribute reply.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #alive? ⇒ Boolean
- #close ⇒ Object
-
#initialize(stream, config, uri) ⇒ ServerSide
constructor
A new instance of ServerSide.
- #recv_request ⇒ Object
- #send_reply(succ, result) ⇒ Object
Constructor Details
#initialize(stream, config, uri) ⇒ ServerSide
142 143 144 145 146 147 |
# File 'lib/drb/drb_websocket.rb', line 142 def initialize(stream, config, uri) @uri = uri @config = config @msg = DRbMessage.new(@config) @req_stream = stream end |
Instance Attribute Details
#reply ⇒ Object (readonly)
Returns the value of attribute reply.
140 141 142 |
# File 'lib/drb/drb_websocket.rb', line 140 def reply @reply end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
140 141 142 |
# File 'lib/drb/drb_websocket.rb', line 140 def uri @uri end |
Instance Method Details
#alive? ⇒ Boolean
152 |
# File 'lib/drb/drb_websocket.rb', line 152 def alive?; false; end |
#close ⇒ Object
149 150 |
# File 'lib/drb/drb_websocket.rb', line 149 def close end |
#recv_request ⇒ Object
154 155 156 157 158 159 160 161 |
# File 'lib/drb/drb_websocket.rb', line 154 def recv_request begin @msg.recv_request(@req_stream) rescue close raise $! end end |
#send_reply(succ, result) ⇒ Object
163 164 165 166 167 168 169 170 171 172 |
# File 'lib/drb/drb_websocket.rb', line 163 def send_reply(succ, result) begin stream = StrStream.new @msg.send_reply(stream, succ, result) @reply = stream.buf rescue close raise $! end end |