Class: Baykit::BayServer::Protocol::PacketPacker
- Inherits:
-
Object
- Object
- Baykit::BayServer::Protocol::PacketPacker
- Includes:
- Util::Reusable
- Defined in:
- lib/baykit/bayserver/protocol/packet_packer.rb
Instance Method Summary collapse
- #end(postman) ⇒ Object
- #flush(postman) ⇒ Object
- #post(postman, pkt, &lisnr) ⇒ Object
- #reset ⇒ Object
Instance Method Details
#end(postman) ⇒ Object
23 24 25 |
# File 'lib/baykit/bayserver/protocol/packet_packer.rb', line 23 def end(postman) postman.post_end() end |
#flush(postman) ⇒ Object
19 20 21 |
# File 'lib/baykit/bayserver/protocol/packet_packer.rb', line 19 def flush(postman) postman.flush() end |
#post(postman, pkt, &lisnr) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/baykit/bayserver/protocol/packet_packer.rb', line 10 def post(postman, pkt, &lisnr) if postman == nil || pkt == nil || lisnr == nil raise Sink.new() end postman.post(pkt.buf[0, pkt.buf_len], nil, pkt) do lisnr.call() end end |
#reset ⇒ Object
7 8 |
# File 'lib/baykit/bayserver/protocol/packet_packer.rb', line 7 def reset() end |