Click here to Skip to main content
15,894,460 members
Articles / Programming Languages / C++

How Proxy Server serves FTP clients?

Rate me:
Please Sign up or sign in to vote.
4.80/5 (23 votes)
10 Feb 2005CPOL7 min read 211K   5.4K   62  
This article describes how Proxy Server deals with PORT and PASV FTP commands
// Request.h : header file
//

#ifndef __Request_H__
#define __Request_H__

/////////////////////////////////////////////////////////////////////////////
// CConnectionPropertyPage dialog

struct siteInfo
{
	siteInfo()
	{
		nSent = nReceived = nRequestCount = 0;
	}
	int nSent, nReceived;
	int nRequestCount;
};

extern CPtrList gptrArryTempListeners;
extern CCriticalSection	gUserLogCS;
extern CMapStringToPtr gmapUserToSiteMap;
struct Listener;

struct Request
{
	Request();
	~Request();
public:
	SOCKET socket;
	sockaddr_in address;
	CDWordArray dwArrayHosts;
	int nLogID;
	CString strFunction;
	CString strURL, strExt, strRequest, strHost, strIP;
	int nLength;
	INTERNET_PORT nPort;
	bool bCheckBlocking;
	int nRefCount;
	CFile* pFileCache;
	bool bRequestServer;
	CFile fileLog;
	CCriticalSection csfileLog;
	CTime timeLastModified;
	int nSent, nReceived;
	CMapStringToPtr mapDomainToSocket;			//to hold unique hosts in case of Smtp Request
	int nAppProtocol, nTransProtocol;
	BOOL bLogRequest;
	Listener* pListener;
	int nTime;
};

#endif // __Request_H__

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Egypt Egypt

Comments and Discussions