EHS
Loading...
Searching...
No Matches
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
void LeaveChannel()
Definition TwitchChat.cpp:99
void SendPong()
Definition TwitchChat.cpp:111
void JoinChannel(const Str_8 &newChannel)
Definition TwitchChat.cpp:85
void UnInitialize()
Definition TwitchChat.cpp:75
void Initialize()
Definition TwitchChat.cpp:51
void WhisperMsg(const Str_8 &user, const Str_8 &msg)
Definition TwitchChat.cpp:137
Str_8 RecvMsg()
Definition TwitchChat.cpp:149
TwitchChat()
Definition TwitchChat.cpp:12
void SetToken(const Str_8 &newToken)
Definition TwitchChat.cpp:46
Str_8 GetChannel() const
Definition TwitchChat.cpp:173
TwitchChat & operator=(const TwitchChat &chat)
Definition TwitchChat.cpp:32
void SendMsg(const Str_8 &msg)
Definition TwitchChat.cpp:123
Str_8 GetUsername() const
Definition TwitchChat.cpp:168
Definition Anchor.h:6
Str< Char_8, UInt_64 > Str_8
Definition Str.h:1953