teeworlds_network/examples/03_send_chat.rb
ChillerDragon 6c005497d4 Layout server control msg structure
Thus closed #5
By deciding to support server as well.

This is rebranding from teeworlds-client to teeworlds_network
And thus also including a bunch of file renames
2022-11-09 08:56:18 +01:00

18 lines
366 B
Ruby
Executable file

#!/usr/bin/env ruby
# frozen_string_literal: true
# Chat spamming client
require_relative '../lib/teeworlds_client'
client = TeeworldsClient.new(verbose: true)
# connect to localhost and detach a background thread
client.connect('localhost', 8303, detach: true)
loop do
# send a chat message every 5 seconds
sleep 5
client.send_chat('hello friends!')
end