wsDmur.ocx -         WEB/FTP ...    /    http-proxy:8080,      ! OCX   MS VC 6.0 MFC SP5    Winsock 2.2 API (.  MSDN)   . 

/:
   -  (.. http- PUT) (  FTP-)    ,     1MB.
 : PUT ftp://uid:pwd@ftp.narod.ru/download/temp.zip
   -  (.. http- GET)     FTP,   HTTP ,      2,147,483,647 ,        ,   ,     .
 : GET http://vfpdev.narod.ru/download/wsdmur.zip
   -  21 (..  FTP)     ,  HTTP/1.0  : 80  ,    http-proxy
   -    http-proxy      ocx ,     ,       (.   PUT ),      , HeaderEx (. ,   ''),  ,          .
   -   ocx  , ,     http-StatusCode (GetStatusCode()),     (GetData())         .

 ,       ,      !

  :

:
BSTR LocalHostName() -    
BSTR LocalIP() -  IP-   
BSTR RemoteHostIP() -  IP- 
BSTR GetData() -    
long TotalBytesRecieved() -     
long SendData(BSTR Data) -    
long ContentLength() -     
enumWsStates State() -    (. )
long GetStatusCode() -  StatusCode (. "HTTP 1.0 Status Codes and Reason Phrases"  MSDN)   ,  0
BOOL Stop() -   FD_CLOSE socket-
void AboutBox() -     OCX

:
BSTR RemoteHost -   .    ,  ,     IP-
long RemotePort -     
long LocalPort -  ,    (.. 0),    1251 (    )
BSTR LogFile -  ,       
BSTR FileName -  ,       PUT,       GET
BSTR HeaderEx -   ,     http-   .   ,    : "Proxy-authorization: basic UID:PWD".        ,       "\r\n",          "\r\n".  ,       Proxy-authorization, UID:PWD     Base64,   wsDmur.ocx    , ,        -  ,   .   http://www.planet-source-code.com/xq/ASP/txtCodeId.1710/lngWId.3/qx/vb/scripts/ShowCode.htm   Yoni
.  http://www.rfc-editor.org/rfc/rfc2617.txt 

:
void StateChanged() -     State() (  :-)
void SendProgress(long bytesSent, long bytesRemaining) -       
void DataArrival(long bytesReceived, long lenHeader, long UpLoadCount) -      

typedef enum tagWsStates
{
	wsClosed			= 0,
	wsSetuping		= 1,
	wsListening		= 2,
	wsResolvingHost		= 3,
	wsHostResolved		= 4,
	wsConnectionPending	= 5,
	wsConnected		= 6,
	wsPreparationSending	= 7,
	wsSending		= 8,
	wsWaitingResponse		= 9,
	wsUnexpectedDisconnection	= 10,
	wsClosing		= 11,
	wsError			= 12,
} enumWsStates;

""  dll:
ws2_32.dll
mfc42.dll
msvcrt.dll
kernel32.dll
user32.dll
gui32.dll
shell32.dll
oleout32.dll
msvcp60.dll

       
http://vfpdev.narod.ru/util_r.html :

wsdmurb.zip - VB
wsdmurf.zip - VFP
wsdmurc.zip - VC MFC
wsdmura.zip - VC ATL 

   6.0 + SP5 VS6

  ,  ,    :
RemoteHost - LocalHost
RemotePort - 80
SendData("GET /")

---- 
   1,0,0,1     2,0,0,1:

- -  ,  ,   8080    proxy,          OCX
-  ,  ,     http- : Proxy-Connection: close    Content-Length  FD_CLOSE    proxy-   ...         FD_READ :-(   ,    FD_CLOSE   ""    proxy-           ,   socket  (      FD_CLOSE).        .

---- 
    2,0,0,1:

      ,    ,     socket       FD_READ  ,     ,         :

*** nnn FD_READ
*** Unexpected message FD_READ with empty lpSocketInfo
*** nnn FD_CLOSE
*** Unexpected message FD_CLOSE with empty lpSocketInfo

        ,         :-( ,       . -       :-(

---- 
     2,0,0,2:

      ,    "Unexpected message FD_READ/FD_CLOSE with empty lpSocketInfo"     ,  , ,   -  proxy-server Squid/2.3.STABLE4,    (       )...  ,    ,          (  ). ,         - :   ,    FD_CLOSE    FD_READ     .

----
   2,0,0,3:

    ,    (FileName   GET)        wsClosing  wsError,               .   2,0,0,3         wsClosing  wsError.

----
   2,0,0,4:

  long GetStatusCode() -  StatusCode (. "HTTP 1.0 Status Codes and Reason Phrases"  MSDN) ... -     .
...  -   http-proxy    cache  http-  :
"pragma: no-cache"
   Vasily V. Moshninov  ,    !

----
   2,0,0,6:
-   BSTR HeaderEx -   ,     http-   .   ,    : "Proxy-authorization: basic UID:PWD"  ,   .  
-   BOOL Stop(),    FD_CLOSE socket-

----
   2,0,0,7 (31/12/2003) -    ,   wsDmur.ocx       /ISDN ( ..      ):

-   SendData()      BOOL continueDownload,          . ..       : long SendData(LPCTSTR Data, BOOL continueDownload=FALSE)
-  BOOL Stop()    2,0,0,6    ,   .     continueDownload   SendData(),   continueDownload=TRUE,   /    .
-   2,0,0,7              .      /ISDN    .       .   :

:
- long MaxRecoveryConnect -        (  0      ,   )
- long TimeOutRecoveryConnect -   ( )          ( MaxRecoveryConnect > 0) 
- VARIANT_BOOL ShowErrMsg -   -  ocx   .  ,   -     .   ,       ,  ocx, ..    StateChanged()   ,    enumWsStates State().
-  enumWsStates  : wsWaitingRecoveryConnect = 13,       (  TimeOutRecoveryConnect    )
 
:
-      long SendData([in] BSTR Data, [in, defaultvalue(VARIANT_FALSE)] VARIANT_BOOL continueDownload),      "   "  , ..   "      ",             :-) 
-  VARIANT_BOOL GetErrorInfo([out] long* errCode, [out] BSTR* errMsg),   /  WinSocket-,     ocx.
-      VARIANT_BOOL Stop() (-   boolean,    MFC wizard-   VARIANT_BOOL)
- long GetInitialFileLength() -   "" (continueDownload=TRUE),          ,    (-1).

 !        ,        ,      : http://vfpdev.narod.ru/util_r.html     2,0,0,7

  ,           2,0,0,7  upload  http-proxy server (  ocx   upload/download   proxy-server Squid/2.3.STABLE4)...     " "  ,   ,     .     2,0,0,7  download  http- ...

 ,        " "     http-! :-) 

Best regards.
 ,  , , 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mailto:Drozdov@ics.perm.su
My Page:  http://vfpdev.narod.ru/
ICS Page: http://ics.perm.ru/ [on Russian]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~