lib/maxcube/network/udp/sample_socket.rb in maxcube-client-0.4.1 vs lib/maxcube/network/udp/sample_socket.rb in maxcube-client-0.5.0
- old
+ new
@@ -1,9 +1,10 @@
require 'maxcube/network/udp'
module MaxCube
module Network
module UDP
+ # Simple UDP 'server' for Cube protocol testing purposes.
class SampleSocket
def initialize(port = PORT)
@port = port
@socket = UDPSocket.new
@socket.bind('0.0.0.0', port)