|
1
2
3
4
|
#ifndef CHATROOM_H
#define CHATROOM_H
#include <QMainWindow>
|
|
5
6
7
8
9
10
11
12
|
#include "Socket.h"
struct thread_args
{
pthread_mutex_t *mutex;
pthread_cond_t *condition;
Socket *s;
};
|
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
namespace Ui {
class Chatroom;
}
class Chatroom : public QMainWindow
{
Q_OBJECT
public:
explicit Chatroom(QWidget *parent = 0);
~Chatroom();
private:
Ui::Chatroom *ui;
|
|
28
29
|
void start();
bool connected;
|
|
30
31
|
};
|
|
32
33
34
35
|
void *sendThread(void* args);
void *recvThread(void* args);
void killThread(thread_args *t_arg);
|
|
36
|
#endif // CHATROOM_H
|