// ZZ:UploadBandWithThrottler (UDP) -->

#pragma once

// MOD BEGIN netfinity: Upload Throttling State
enum	EUpThrottleState
{
	THROTTLE_KICKSTART,
	THROTTLE_STANDBY,
	THROTTLE_NORMAL,
	THROTTLE_ENDING
};
// MOD END netfinity

struct SocketSentBytes {
    bool    success;
	uint32	sentBytesStandardPackets;
	uint32	sentBytesControlPackets;
};

class ThrottledControlSocket
{
public:
    virtual SocketSentBytes SendControlData(uint32 maxNumberOfBytesToSend, uint32 minFragSize) = 0;
};

class ThrottledFileSocket : public ThrottledControlSocket
{
public:
    virtual SocketSentBytes SendFileAndControlData(uint32 maxNumberOfBytesToSend, uint32 minFragSize) = 0;
    virtual DWORD GetLastCalledSend() = 0;
    virtual uint32	GetNeededBytes() = 0;
	virtual bool	IsBusy() const = 0;
    virtual bool    HasQueues() const = 0;
// MOD BEGIN netfinity: Upload Throttling State
	ThrottledFileSocket() {m_eThrottleState = THROTTLE_NORMAL; m_iLeftInState = 0; m_bNotNeeded = false;}
	EUpThrottleState	m_eThrottleState;
	uint32				m_iLeftInState;
	bool				m_bNotNeeded;
// MOD END netfinity
};

// <-- ZZ:UploadBandWithThrottler (UDP)
