///////////////////////////////////////////////////////////////////////////////
/// @file deTCPConnectionBin.hpp
///
/// @brief 
///
/// @author trajar
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date Jun 2002
/// @author trajar
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

#ifndef	_DETCPCONNECTIONBIN_HPP
#define _DETCPCONNECTIONBIN_HPP

#ifndef		_DENET_HPP
 #include	"deNet.hpp"
#endif

#ifndef		_DECONNECTIONBIN_HPP
 #include	"deConnectionBin.hpp"
#endif

#ifndef		_DENETWINSOCK_HPP
 #include	"deNetWinsock.hpp"
#endif

#include	<STACK>
#include	<VECTOR>
typedef		std::vector< WSABUF >	aBuffers;
typedef		std::stack< WSABUF >	stkBuffers;

class DENET_API deTCPConnectionBin : public deConnectionBin
{
public:
	deTCPConnectionBin(void);
	virtual ~deTCPConnectionBin(void);

	void				AddBuffer( WSABUF pBuff );
	WSABUF				GetFreeBuffer(void);
	int					GetNumFreeBuffers( void );

	virtual eNetError	OnWorkerThread( deConnectionBin * pBin );

private:

	aBuffers			m_aPendingBuffers;
	stkBuffers			m_stkBuffers;
};

#endif