Parent

Methods

Class Index [+]

Quicksearch

MessagePack::RPC::UDPServerTransport

Public Class Methods

new(address) click to toggle source
     # File lib/msgpack/rpc/transport/udp.rb, line 124
124:         def initialize(address)
125:                 @address = address
126:                 @sock = nil
127:         end

Public Instance Methods

close() click to toggle source

ServerTransport interface

     # File lib/msgpack/rpc/transport/udp.rb, line 152
152:         def close
153:                 return unless @lsock
154:                 @lsock.detach if @lsock.attached?
155:                 @lsock.close
156:         end
listen(server) click to toggle source

ServerTransport interface

     # File lib/msgpack/rpc/transport/udp.rb, line 130
130:         def listen(server)
131:                 @server = server
132:                 host, port = *@address.unpack
133:                 io = UDPSocket.new
134:                 io.bind(*@address)
135: 
136:                 begin
137:                         @sock = ServerSocket.new(io, @server)
138:                 rescue
139:                         io.close
140:                         raise
141:                 end
142: 
143:                 begin
144:                         @server.loop.attach(@sock)
145:                 rescue
146:                         @sock.close
147:                         raise
148:                 end
149:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.