Method: Cod::SocketServer#get_ext
- Defined in:
- lib/cod/socket_server.rb
#get_ext(opts = {}) ⇒ Array<Object, TcpClient>
Receives one object from the channel. Returns a tuple of <message,channel> where channel is a tcp channel that links back to the client that sent message.
Using this method, the server can communicate back to its clients individually instead of collectively.
50 51 52 53 54 55 |
# File 'lib/cod/socket_server.rb', line 50 def get_ext(opts={}) msg, socket = _get(opts) return [ msg, back_channel(socket)] end |