FtpdPasvSrv.cpp
资源名称:FTP服务器源代码.zip [点击查看]
上传用户:shengde
上传日期:2007-02-26
资源大小:117k
文件大小:1k
源码类别:
Ftp服务器
开发平台:
Visual C++
- #include "stdafx.h"
- #include "FtpdPasvSrv.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- char sadr[32];
- CFtpPasvSrv::CFtpPasvSrv()
- {
- m_port_from = 1524;
- m_port_to = 65530;
- }
- CFtpPasvSrv::CFtpPasvSrv(CSocket* dataSkt,UINT from, UINT to)
- {
- AfxSocketInit(NULL);
- m_port_from = from;
- m_port_to = to;
- strcpy(sadr,"");
- Create(SOCK_STREAM);
- for(UINT i=m_port_from;i<=m_port_to;i++)
- {
- CSockAddr tSockAdr(INADDR_ANY,i);
- if(Bind(tSockAdr))
- {
- m_current_port = i;
- i = 65536;
- }
- }
- }
- CFtpPasvSrv::~CFtpPasvSrv()
- {
- }
- UINT CFtpPasvSrv::launchSocket()
- {
- return 0;
- }
- void CFtpPasvSrv::AttachSocket(CSocket *dataSkt)
- {
- }