Add example only for the verbose snap

Same as `./client_sample.rb -s`
But easier to find, link and reason about.
This commit is contained in:
ChillerDragon 2024-02-18 15:34:51 +08:00
parent e25a108a13
commit 43c34fb0eb

12
examples/11_snap_debugger.rb Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
# connects to a server and prints color annotated snap items
# https://chillerdragon.github.io/teeworlds-protocol/img/snap_dump_07.png
require_relative '../lib/teeworlds_client'
client = TeeworldsClient.new(verbose: false, verbose_snap: true)
# connect to localhost and block the current thread
client.connect('localhost', 8303, detach: false)