Class: Baykit::BayServer::Protocol::ProtocolHandler
- Inherits:
-
Object
- Object
- Baykit::BayServer::Protocol::ProtocolHandler
- Includes:
- Util, Util::Reusable
- Defined in:
- lib/baykit/bayserver/protocol/protocol_handler.rb
Instance Attribute Summary collapse
-
#command_packer ⇒ Object
readonly
Returns the value of attribute command_packer.
-
#command_unpacker ⇒ Object
readonly
Returns the value of attribute command_unpacker.
-
#packet_packer ⇒ Object
readonly
Returns the value of attribute packet_packer.
-
#packet_store ⇒ Object
readonly
Returns the value of attribute packet_store.
-
#packet_unpacker ⇒ Object
readonly
Returns the value of attribute packet_unpacker.
-
#server_mode ⇒ Object
readonly
Returns the value of attribute server_mode.
-
#ship ⇒ Object
Returns the value of attribute ship.
Instance Method Summary collapse
-
#bytes_received(buf) ⇒ Object
Other methods.
-
#max_req_packet_data_size ⇒ Object
Get max of request data size (maybe not packet size).
-
#max_res_packet_data_size ⇒ Object
Get max of response data size (maybe not packet size).
-
#protocol ⇒ Object
Abstract methods.
-
#reset ⇒ Object
Implements Reusable.
- #to_s ⇒ Object
Instance Attribute Details
#command_packer ⇒ Object (readonly)
Returns the value of attribute command_packer.
14 15 16 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 14 def command_packer @command_packer end |
#command_unpacker ⇒ Object (readonly)
Returns the value of attribute command_unpacker.
13 14 15 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 13 def command_unpacker @command_unpacker end |
#packet_packer ⇒ Object (readonly)
Returns the value of attribute packet_packer.
12 13 14 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 12 def packet_packer @packet_packer end |
#packet_store ⇒ Object (readonly)
Returns the value of attribute packet_store.
15 16 17 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 15 def packet_store @packet_store end |
#packet_unpacker ⇒ Object (readonly)
Returns the value of attribute packet_unpacker.
11 12 13 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 11 def packet_unpacker @packet_unpacker end |
#server_mode ⇒ Object (readonly)
Returns the value of attribute server_mode.
16 17 18 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 16 def server_mode @server_mode end |
#ship ⇒ Object
Returns the value of attribute ship.
17 18 19 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 17 def ship @ship end |
Instance Method Details
#bytes_received(buf) ⇒ Object
Other methods
58 59 60 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 58 def bytes_received(buf) return @packet_unpacker.bytes_received(buf) end |
#max_req_packet_data_size ⇒ Object
Get max of request data size (maybe not packet size)
44 45 46 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 44 def max_req_packet_data_size() raise NotImplementedError() end |
#max_res_packet_data_size ⇒ Object
Get max of response data size (maybe not packet size)
51 52 53 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 51 def max_res_packet_data_size() raise NotImplementedError() end |
#protocol ⇒ Object
Abstract methods
37 38 39 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 37 def protocol() raise NotImplementedError() end |
#reset ⇒ Object
Implements Reusable
26 27 28 29 30 31 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 26 def reset() @command_unpacker.reset() @command_packer.reset() @packet_unpacker.reset() @packet_packer.reset() end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/baykit/bayserver/protocol/protocol_handler.rb', line 19 def to_s() return ClassUtil.get_local_name(self.class) + " ship=" + ship.to_s end |