Connect to given server. The option ``:detach`` decides wether the connection should run in a background thread or not.
By default no thread will be spawned. And the ``connect()`` method blocks your main thread. Meaning no line below that will be run as long as the connection is up.
If you decide to provide the option ``detach: true`` it will spawn a thread and run the connection in there. Meaning it will jump to the next line after ``connect()`` is called. So it is your responsibility to keep the program running.
If the connection happens in the last line of your program it will just quit. So you have to keep it up using a loop for example.
**Example:**
```ruby
client = TeeworldsClient.new(verbose: true)
# this will spawn a background thread
client.connect('localhost', 8303, detach: true)
# this line will be run directly after the connection
# this line will be running as long as the connection is up
client.connect('localhost', 8303, detach: false)
# this line will only be run if the connection broke
```
### send_chat(str)
**Parameter: str [String]**
Send a chat message. Takes the chat message as String.