// 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 <Idcustomtransparentproxy.hpp>	// Pascal unit
#include <Idbasecomponent.hpp>	// Pascal unit
#include <Idglobal.hpp>	// Pascal unit
#include <Idiohandler.hpp>	// Pascal unit
#include <Idsockethandle.hpp>	// Pascal unit
#include <Idsys.hpp>	// Pascal unit
#include <Idobjs.hpp>	// Pascal unit
#include <Idcomponent.hpp>	// Pascal unit
#include <Classes.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;
	AnsiString FBoundIP;
	int FBoundPort;
	int FBoundPortMax;
	int FBoundPortMin;
	int FDefaultPort;
	Classes::TNotifyEvent FOnBeforeBind;
	Classes::TNotifyEvent FOnAfterBind;
	Classes::TNotifyEvent FOnSocketAllocated;
	Idcustomtransparentproxy::TIdCustomTransparentProxy* FTransparentProxy;
	bool FUseNagle;
	Idglobal::TIdIPVersion FIPVersion;
	virtual void __fastcall ConnectClient(void);
	virtual void __fastcall DoBeforeBind(void);
	virtual void __fastcall DoAfterBind(void);
	virtual void __fastcall DoSocketAllocated(void);
	virtual void __fastcall InitComponent(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	virtual AnsiString __fastcall GetDestination();
	virtual void __fastcall SetDestination(const AnsiString AValue);
	virtual Idcustomtransparentproxy::TIdCustomTransparentProxy* __fastcall GetTransparentProxy(void);
	virtual void __fastcall SetTransparentProxy(Idcustomtransparentproxy::TIdCustomTransparentProxy* AProxy);
	void __fastcall SetUseNagle(bool AValue);
	void __fastcall SetNagleOpt(bool AEnabled);
	
public:
	__fastcall virtual ~TIdIOHandlerSocket(void);
	bool __fastcall BindingAllocated(void);
	virtual void __fastcall Close(void);
	virtual bool __fastcall Connected(void);
	virtual void __fastcall Open(void);
	virtual __int64 __fastcall WriteFile(const AnsiString AFile, bool AEnableTransferFile = false);
	__property Idsockethandle::TIdSocketHandle* Binding = {read=FBinding};
	__property int BoundPortMax = {read=FBoundPortMax, write=FBoundPortMax, nodefault};
	__property int BoundPortMin = {read=FBoundPortMin, write=FBoundPortMin, nodefault};
	__property Classes::TNotifyEvent OnBeforeBind = {read=FOnBeforeBind, write=FOnBeforeBind};
	__property Classes::TNotifyEvent OnAfterBind = {read=FOnAfterBind, write=FOnAfterBind};
	__property Classes::TNotifyEvent OnSocketAllocated = {read=FOnSocketAllocated, write=FOnSocketAllocated};
	
__published:
	__property AnsiString BoundIP = {read=FBoundIP, write=FBoundIP};
	__property int BoundPort = {read=FBoundPort, write=FBoundPort, default=0};
	__property int DefaultPort = {read=FDefaultPort, write=FDefaultPort, nodefault};
	__property Idglobal::TIdIPVersion IPVersion = {read=FIPVersion, write=FIPVersion, default=0};
	__property Idcustomtransparentproxy::TIdCustomTransparentProxy* TransparentProxy = {read=GetTransparentProxy, write=SetTransparentProxy};
	__property bool UseNagle = {read=FUseNagle, write=SetUseNagle, default=1};
public:
	#pragma option push -w-inl
	/* TIdBaseComponent.Create */ inline __fastcall TIdIOHandlerSocket(Classes::TComponent* AOwner)/* overload */ : Idiohandler::TIdIOHandler(AOwner) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint IdDefTimeout = 0x0;
static const Shortint IdBoundPortDefault = 0x0;

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

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