Sha256: 774badf57d3b4b0c3f18dfe6b3c54e7b98d892b1ea1d04c00b77300adcf9f0ee
Contents?: true
Size: 482 Bytes
Versions: 6
Compression:
Stored size: 482 Bytes
Contents
require 'socket' require "uri" module GameMachine module Clients class UdpClient def initialize(server) @host = Settings.servers.send(server).udp_host @port = Settings.servers.send(server).udp_port @socket = UDPSocket.new @socket.connect(@host,@port) end def send_message(message) @socket.send(message,@host,@port) end def receive_message @socket.recvfrom(1024)[0] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems