vc++网络编程教程的源码。可能对使用vc网络编程的有用。

源代码在线查看: request.cpp

软件大小: 4930 K
上传用户: kelvinitc
关键词: 网络编程 vc 教程 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

				// Request.cpp : implementation of the CRequest class
				//
				// This is a part of the Microsoft Foundation Classes C++ library.
				// Copyright (C) 1997-1998 Microsoft Corporation
				// All rights reserved.
				//
				// This source code is only intended as a supplement to the
				// Microsoft Foundation Classes Reference and related
				// electronic documentation provided with the library.
				// See these sources for detailed information regarding the
				// Microsoft Foundation Classes product.
				
				#include "stdafx.h"
				
				#include "HttpSvr.h"
				#include "Request.h"
				
				#ifdef _DEBUG
				#define new DEBUG_NEW
				#undef THIS_FILE
				static char THIS_FILE[] = __FILE__;
				#endif
				
				IMPLEMENT_DYNCREATE(CRequest, CObject)
				
				CRequest::CRequest( void )
				{
					m_nRefs = 1;
					m_bDone = FALSE;
					m_dwExecute = 0;
					m_cbBody = 0;
					m_dwAttr = 0;
					m_uStatus = 0;
					m_cbSent = 0;
					m_timeReq = CTime::GetCurrentTime();
				}
				
				CRequest::~CRequest( void )
				{
				}
				
				CString CRequest::GetHeaderValue( CString strName )
				{
					CString strValue;
					strName.MakeLower();
					m_mapHeaders.Lookup( strName, strValue );
					return strValue;
				}
				
				int CRequest::AddRef( void )
				{
					return ++m_nRefs;
				}
				
				int CRequest::Release( void )
				{
					int nRefs = --m_nRefs;
					if ( nRefs == 0 )
						delete this;
					return nRefs;
				}
							

相关资源