Twitch Chat is a simple IRC chat. For any serious development, there are multiple documents for it, including the most comprehensive and general ressource: http://ircdocs.horse/
Connection, Handshake
IRC is a basic, plaintext based TCP protocol. Connecting to Twitch works just like any regular...