mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-07 05:57:47 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include "Replicator.h"
|
||||
|
||||
#include "BitStream.h"
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace RBX {
|
||||
namespace Network {
|
||||
|
||||
class ConcurrentRakPeer;
|
||||
class Item;
|
||||
|
||||
class Replicator::ItemSender : boost::noncopyable
|
||||
{
|
||||
Replicator& replicator;
|
||||
ConcurrentRakPeer* rakPeer;
|
||||
shared_ptr<RakNet::BitStream> bitStream;
|
||||
PacketPriority packetPriority;
|
||||
|
||||
void openPacket();
|
||||
void closePacket();
|
||||
const unsigned int maxStreamSize;
|
||||
public:
|
||||
bool sentItems;
|
||||
ItemSender(Replicator& replicator, ConcurrentRakPeer *rakPeer);
|
||||
~ItemSender();
|
||||
|
||||
typedef enum {SEND_BITSTREAM_FULL = 0, SEND_OK} SendStatus;
|
||||
|
||||
SendStatus send(Item& item);
|
||||
int getNumberOfBytesUsed() const;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user