Blob Blame Raw
#ifndef CONNECTION_H
#define CONNECTION_H


#include "tcpqueue.h"
#include "udpsendqueue.h"
#include "udprecvqueue.h"


class Tunnel;


class Connection {
public:
	Tunnel &tunnel;
	const ConnId id;
	int tcpSockId;
	bool udpActive;
	
	TcpQueue tcpSendQueue;
	TcpQueue tcpRecvQueue;
	UdpSendQueue udpSendQueue;
	UdpRecvQueue udpRecvQueue;

	Connection(Tunnel &tunnel, const ConnId &id, int tcpSockId);
	~Connection();
	
	bool wantReadFromTcp() const;
	bool wantWriteToTcp() const;
	Time whenWriteToUdp() const;
};


#endif