Module: Plug::UdpServer
- Includes:
- Base
- Defined in:
- lib/rbkb/plug/plug.rb
Overview
An abstract module to implement custom servers for any protocol incoming messages are diverted to ‘process(dat, sender)’ which takes a block, the yields to which are messages to respond with
Instance Attribute Summary
Attributes included from Base
#no_stop_on_unbind, #peers, #tls, #tls_opts, #transport
Instance Method Summary collapse
Methods included from Base
#connection_completed, #initialize, #name, #plug_peer, #plug_receive, #post_init, #receive_data, #unbind
Instance Method Details
#kind ⇒ Object
138 |
# File 'lib/rbkb/plug/plug.rb', line 138 def kind ; :server ; end |
#say(dat, sender) ⇒ Object
140 141 142 143 144 145 146 |
# File 'lib/rbkb/plug/plug.rb', line 140 def say(dat, sender) super(dat, sender) if self.respond_to? :process self.send(:process, dat, sender) { |rply| sender.say(rply, self) } end end |