Middleman.Client = class.new();

function Middleman.Client:constructor(hostname, port, tcpOrUdp)
	self.socket =	network.socket(tcpOrUdp);
	self.port	=	port or 39627;

	if( not self.socket:connect(hostname, self.port) ) then
		error(sprintf("Unable to connect to port %d on \'%s\'.", self.port), 2);
	end
end

function Middleman.Client:send(data)
	self.socket:send(data);
end