// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Idiohandlersocket.pas' rev: 10.00

#ifndef IdiohandlersocketHPP
#define IdiohandlersocketHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Idglobal.hpp>	// Pascal unit
#include <Idsocks.hpp>	// Pascal unit
#include <Idsockethandle.hpp>	// Pascal unit
#include <Idiohandler.hpp>	// Pascal unit
#include <Idexception.hpp>	// Pascal unit
#include <Idcomponent.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Idiohandlersocket
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TIdIOHandlerSocket;
class PASCALIMPLEMENTATION TIdIOHandlerSocket : public Idiohandler::TIdIOHandler 
{
	typedef Idiohandler::TIdIOHandler inherited;
	
protected:
	Idsockethandle::TIdSocketHandle* FBinding;
	bool FUseNagle;
	Idsocks::TIdSocksInfo* FSocksInfo;
	void __fastcall SetSocksInfo(Idsocks::TIdSocksInfo* ASocks);
	Idsocks::TIdSocksInfo* __fastcall GetSocksInfo(void);
	void __fastcall SetUseNagle(bool AValue);
	void __fastcall SetNagleOpt(bool AEnabled);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	
public:
	virtual void __fastcall Close(void);
	virtual void __fastcall ConnectClient(const AnsiString AHost, const int APort, const AnsiString ABoundIP, const int ABoundPort, const int ABoundPortMin, const int ABoundPortMax, const int ATimeout = 0xffffffff);
	virtual bool __fastcall Connected(void);
	__fastcall virtual TIdIOHandlerSocket(Classes::TComponent* AOwner);
	__fastcall virtual ~TIdIOHandlerSocket(void);
	virtual void __fastcall Open(void);
	virtual bool __fastcall Readable(int AMSec = 0xffffffff);
	virtual int __fastcall Recv(void *ABuf, int ALen);
	virtual int __fastcall Send(void *ABuf, int ALen);
	__property Idsockethandle::TIdSocketHandle* Binding = {read=FBinding};
	
__published:
	__property Idsocks::TIdSocksInfo* SocksInfo = {read=GetSocksInfo, write=SetSocksInfo};
	__property bool UseNagle = {read=FUseNagle, write=SetUseNagle, default=1};
};


//-- var, const, procedure ---------------------------------------------------

}	/* namespace Idiohandlersocket */
using namespace Idiohandlersocket;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Idiohandlersocket
