Class: ParallelWork::Messaging::Receiving
- Inherits:
-
Object
- Object
- ParallelWork::Messaging::Receiving
- Defined in:
- lib/parallel_work/messaging.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(socket) ⇒ Receiving
constructor
A new instance of Receiving.
- #recv_message ⇒ Object
Constructor Details
#initialize(socket) ⇒ Receiving
Returns a new instance of Receiving.
71 72 73 |
# File 'lib/parallel_work/messaging.rb', line 71 def initialize socket @socket = socket end |
Class Method Details
.recv(socket) ⇒ Object
67 68 69 |
# File 'lib/parallel_work/messaging.rb', line 67 def self.recv socket new(socket). end |
Instance Method Details
#recv_message ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/parallel_work/messaging.rb', line 75 def = .strip = if .has_payload? payload_length = recv_payload_length marshalled_payload = recv_payload payload_length unmarshalled_payload = unmarshall_payload marshalled_payload .payload = unmarshalled_payload end end |