blob: 964359f982da2c0ea50a1de6059f2c7e088916b2 (
plain)
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
|
#include "stdafx.h"
#include <iostream>
#include "InputOutputStream.h"
#include "PacketListener.h"
#include "ContainerClosePacket.h"
ContainerClosePacket::ContainerClosePacket()
{
containerId = 0;
}
ContainerClosePacket::ContainerClosePacket(int containerId)
{
this->containerId = containerId;
}
void ContainerClosePacket::handle(PacketListener *listener)
{
listener->handleContainerClose(shared_from_this());
}
void ContainerClosePacket::read(DataInputStream *dis) //throws IOException
{
containerId = dis->readByte();
}
void ContainerClosePacket::write(DataOutputStream *dos) //throws IOException
{
dos->writeByte(containerId);
}
int ContainerClosePacket::getEstimatedSize()
{
return 1;
}
|