State pattern example

This example presents a TCP client that uses the state pattern according
the client state: conection closed, conection establishes and waiting
response form the server.