-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathNetworkTask.cpp
More file actions
49 lines (40 loc) · 759 Bytes
/
NetworkTask.cpp
File metadata and controls
49 lines (40 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "NetworkTask.h"
NetworkTask::NetworkTask()
:QObject()
{
}
SendTask::SendTask(const QByteArray &message, const QHostAddress &ip, const unsigned short port)
:NetworkTask(),
m_message(message),
m_ip(ip),
m_port(port)
{
}
NetworkTask::TaskType SendTask::getType()
{
return NetworkTask::SEND;
}
const QByteArray &SendTask::getMessage()
{
return m_message;
}
const QHostAddress &SendTask::getIp()
{
return m_ip;
}
unsigned short SendTask::getPort()
{
return m_port;
}
ReceiveTask::ReceiveTask(qintptr socketId)
:NetworkTask(),
m_socketId(socketId)
{}
NetworkTask::TaskType ReceiveTask::getType()
{
return NetworkTask::RECEIVE;
}
qintptr ReceiveTask::getSocketId()
{
return m_socketId;
}