30 bool reliable_,
bool ack_=
false):
54 assert(parent != NULL);
61 void runTimeouts(
float dtime, u32 peer_packet_quota);
78 void sendPackets(
float dtime, u32 peer_packet_quota);
132 u8 channelnum,
bool reliable);
Definition semaphore.h:18
Definition internal.h:362
SharedBuffer< u8 > handlePacketType_Reliable(Channel *channel, const SharedBuffer< u8 > &packetdata, Peer *peer, u8 channelnum, bool reliable)
Definition threads.cpp:1293
void receive(SharedBuffer< u8 > &packetdata, bool &packet_queued)
Definition threads.cpp:904
ConnectionReceiveThread()
Definition threads.cpp:802
void * run()
Definition threads.cpp:807
SharedBuffer< u8 > handlePacketType_Original(Channel *channel, const SharedBuffer< u8 > &packetdata, Peer *peer, u8 channelnum, bool reliable)
Definition threads.cpp:1255
bool getFromBuffers(session_t &peer_id, SharedBuffer< u8 > &dst)
Definition threads.cpp:1059
SharedBuffer< u8 > processPacket(Channel *channel, const SharedBuffer< u8 > &packetdata, session_t peer_id, u8 channelnum, bool reliable)
Definition threads.cpp:1115
SharedBuffer< u8 > handlePacketType_Split(Channel *channel, const SharedBuffer< u8 > &packetdata, Peer *peer, u8 channelnum, bool reliable)
Definition threads.cpp:1269
SharedBuffer< u8 > handlePacketType_Control(Channel *channel, const SharedBuffer< u8 > &packetdata, Peer *peer, u8 channelnum, bool reliable)
Definition threads.cpp:1154
Connection * m_connection
Definition threads.h:171
static const PacketTypeHandler packetTypeRouter[PACKET_TYPE_MAX]
Definition threads.h:169
bool checkIncomingBuffers(Channel *channel, session_t &peer_id, SharedBuffer< u8 > &dst)
Definition threads.cpp:1081
RateLimitHelper m_new_peer_ratelimit
Definition threads.h:173
void setParent(Connection *parent)
Definition threads.h:105
unsigned int m_max_data_packets_per_iteration
Definition threads.h:94
Semaphore m_send_sleep_semaphore
Definition threads.h:91
void send(session_t peer_id, u8 channelnum, const SharedBuffer< u8 > &data)
Definition threads.cpp:582
void * run()
Definition threads.cpp:66
void processReliableCommand(ConnectionCommandPtr &c)
Definition threads.cpp:388
std::queue< OutgoingPacket > m_outgoing_queue
Definition threads.h:90
unsigned int m_iteration_packets_avaialble
Definition threads.h:93
void disconnect_peer(session_t peer_id)
Definition threads.cpp:560
void connect(Address address)
Definition threads.cpp:517
void processNonReliableCommand(ConnectionCommandPtr &c)
Definition threads.cpp:448
void setParent(Connection *parent)
Definition threads.h:52
void sendToAll(u8 channelnum, const SharedBuffer< u8 > &data)
Definition threads.cpp:623
float m_timeout
Definition threads.h:89
void serve(Address bind_address)
Definition threads.cpp:503
void disconnect()
Definition threads.cpp:542
void setPeerTimeout(float peer_timeout)
Definition threads.h:58
bool packetsQueued()
Definition threads.cpp:138
void sendToAllReliable(ConnectionCommandPtr &c)
Definition threads.cpp:632
ConnectionSendThread(unsigned int max_packet_size, float timeout)
Definition threads.cpp:48
unsigned int m_max_packets_requeued
Definition threads.h:95
void sendAsPacket(session_t peer_id, u8 channelnum, const SharedBuffer< u8 > &data, bool ack=false)
Definition threads.cpp:795
void runTimeouts(float dtime, u32 peer_packet_quota)
Definition threads.cpp:165
void Trigger()
Definition threads.cpp:133
bool rawSendAsPacket(session_t peer_id, u8 channelnum, const SharedBuffer< u8 > &data, bool reliable)
Definition threads.cpp:334
void sendAsPacketReliable(BufferedPacketPtr &p, Channel *channel)
Definition threads.cpp:314
void rawSend(const BufferedPacket *p)
Definition threads.cpp:299
void sendReliable(ConnectionCommandPtr &c)
Definition threads.cpp:614
void sendPackets(float dtime, u32 peer_packet_quota)
Definition threads.cpp:646
Connection * m_connection
Definition threads.h:87
void resendReliable(Channel &channel, const BufferedPacket *k, float resend_timeout)
Definition threads.cpp:272
unsigned int m_max_packet_size
Definition threads.h:88
Definition internal.h:463
@ PACKET_TYPE_MAX
Definition internal.h:110
std::shared_ptr< BufferedPacket > BufferedPacketPtr
Definition impl.h:90
std::shared_ptr< ConnectionCommand > ConnectionCommandPtr
Definition impl.h:87
u64 getTimeS()
Definition porting.h:168
u16 session_t
Definition networkprotocol.h:22
Definition internal.h:180
SharedBuffer< u8 >(ConnectionReceiveThread::* handler)(Channel *channel, const SharedBuffer< u8 > &packet, Peer *peer, u8 channelnum, bool reliable)
Definition threads.h:149
int counter
Definition threads.h:156
u64 time
Definition threads.h:155
void tick()
Definition threads.h:159
bool logged
Definition threads.h:157
u8 channelnum
Definition threads.h:24
bool ack
Definition threads.h:27
session_t peer_id
Definition threads.h:23
bool reliable
Definition threads.h:26
SharedBuffer< u8 > data
Definition threads.h:25
OutgoingPacket(session_t peer_id_, u8 channelnum_, const SharedBuffer< u8 > &data_, bool reliable_, bool ack_=false)
Definition threads.h:29
static std::string p(std::string path)
Definition test_filesys.cpp:53