EHS
TwitchChat.h
Go to the documentation of this file.
1#pragma once
2
3#include "ehs/EHS.h"
4#include "ehs/Str.h"
5#include "ehs/io/socket/TCP.h"
6
7namespace ehs
8{
9 class EHS_LIB_IO TwitchChat
10 {
11 private:
12 TCP client;
13 Str_8 username;
14 Str_8 token;
15 Str_8 channel;
16 bool initialized;
17
18 public:
20
21 TwitchChat();
22
23 TwitchChat(const Str_8& username);
24
25 TwitchChat(const Str_8& username, const Str_8& token);
26
27 TwitchChat(const TwitchChat& chat);
28
29 TwitchChat& operator=(const TwitchChat& chat);
30
31 void SetToken(const Str_8& newToken);
32
33 void Initialize();
34
35 void UnInitialize();
36
37 void JoinChannel(const Str_8& newChannel);
38
39 void LeaveChannel();
40
41 void SendPong();
42
43 void SendMsg(const Str_8& msg);
44
45 void WhisperMsg(const Str_8& user, const Str_8& msg);
46
47 Str_8 RecvMsg();
48
49 Str_8 GetUsername() const;
50
51 Str_8 GetChannel() const;
52 };
53}
A wrapper class for the transmission control protocol socket.
Definition: TCP_BSD.h:14
Definition: TwitchChat.h:10
Definition: Anchor.h:6
EHS_LIB_IO void Initialize(Str_8 appName, Str_8 appVerId, const Version &appVer)
Definition: EHS.cpp:34