bind()
Instance Public methods
creates a socket bound to self.
If a block is given, it is called with the socket and the value of the block is returned. The socket is returned otherwise.
1 2 3 4 | Addrinfo.udp( "0.0.0.0" , 9981 ).bind {|s| s.local_address.connect {|s| s.send "hello" , 0 } p s.recv( 10 ) #=> "hello" } |
Please login to continue.