mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 14:53:37 +00:00
28 lines
763 B
C++
28 lines
763 B
C++
#include "../../Platform/stdafx.h"
|
|
#include <iostream>
|
|
#include "../../IO/Streams/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 = (int)dis->readByte();
|
|
}
|
|
|
|
void ContainerClosePacket::write(DataOutputStream* dos) // throws IOException
|
|
{
|
|
dos->writeByte((uint8_t)containerId);
|
|
}
|
|
|
|
int ContainerClosePacket::getEstimatedSize() { return 1; }
|