Outgoing connection class.
#include <nrg_connection.h>
Public Member Functions | |
ConnectionOut (const NetAddress &remote_addr, const Socket &sock_out) | |
Create a new ConnectionOut that will send packets to remote_addr using the Socket sock_out . | |
Status | sendPacket (Packet &p, PacketFlags f=PKTFLAG_NONE) |
Send Packet p , prepending header information including the given flags f , and applying any transformation. | |
Status | sendDisconnect (Packet &extra_data) |
Send a Packet informing the remote host that the connection is over, extra_data can be a message explaining why. | |
Status | resendLastPacket (void) |
Resends the last packet that was sent via this ConnectionOut instance. | |
Status | getLastStatus () const |
Gets the Status that the last sending operation returned. | |
void | setTransform (PacketTransformation *transform) |
Set a PacketTransformation to be removed from packets added to the connection. | |