xHarbour Reference Documentation > Class Reference (textmode) xHarbour Developers Network  

TIpClient()

Abstract class for internet communication.

Sub-classes:

TIpClientFtp()
TIpClientHttp()
TIpClientPop()
TIpClientSmtp()

Description

TIpClient() is an abstract class providing instance variables and methods for four sub-classes. These sub-classes are used for internet communication with the FTP, HTTP, POP and SMTP protocols. TIpClient() objects are never instantiated directly. The class defines generic instance variables and methods required for all four internet protocols.

Instance variables

:cReply
Reply message of server.
:exGauge
Codeblock or function pointer for progress information.
:lTrace
Logical value indicating trace logging.
:nConnTimeout
Numeric timeout value in milliseconds.
:nDefaultPort
Numeric port number.
:nLastRead
Number of bytes read.
:nLastWrite
Number of bytes written.
:oUrl
TUrl object.

Communication

:close() --> nErrorCode
Closes the internet connection.
:commit() --> lSuccess
Commits data.
:open( [<cUrl>] ) --> lSuccess
Opens the internet connection.
:read( <nBytes> ) --> cData
Reads data from the internet connection.
:reset() --> lSuccess
Resets internal state variables.
:write( <cData>, [<nBytes>], [<lCommit>] ) --> nBytesWritten
Writes data to the internet connection.

Error info

:lastErrorCode() --> nErrorCode
Returns the last error code.
:lastErrorMessage() --> cErrorMessage
Returns the last error message.

File handling

:readToFile( <cFileName>, [<nFileAttr>], <nBytes> ) --> lSuccess
Reads data from the internet connection to a local file.
:writeFromFile( <cFileName> ) --> lSuccess
Writes data from a local file to the internet connection.

Info

See also:TIpClientFtp(), TIpClientHttp(), TIpClientPop(), TIpClientSmtp(), TUrl()
Category: Internet functions , Object functions , xHarbour extensions
Source:tip\client.prg
LIB:lib\xhb.lib
DLL:dll\xhb.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe