{ interface type THttpPipeBase = Class implementation constructor THttpBase.Create; destructor THttpBase.Destroy;
if hHttpHc <> nil then if hHttpIe <> nil then //检查数据有效性
//填充主机地址 if(hHttpHc =nil) then Result:= FALSE; hHttpFp := HttpOpenRequest(hHttpHc, if(hHttpFp =nil) then Result:= FALSE;
//管道类 destructor THttpPipeBase.Destroy; Function THttpPipeBase.StartWork(m_ServerAddr:Pchar;m_ServerPort,nSend,nRecv:Word):Bool; //创建接收管道 begin //连接接收管道 //创建发送管道 begin //连接发送管道 begin Result:= TRUE; Function THttpPipeBase.SendData(PData:Pchar;nLen:DWORD):bool; Function THttpPipeBase.RecvData(PData:Pchar;nLen:DWORD):bool; if(dwNumberOfBytesReaded = 0) then p := p+dwNumberOfBytesReaded; procedure THttpPipeBase.StopWork(); end. |