xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

INetSendAll()

Sends all data to a socket.

Syntax

INetSendAll( <pSocket>, <cData>, [<nBytes>] ) --> nBytesSent

Arguments

<pSocket>
This is a pointer to a socket as returned by INetConnect() or INetAccept().
<cData>
This is a character string holding the data to send to the socket. It must have at least <nBytes> characters.
<nBytes>
This is a numeric value specifying the number of bytes to transfer to the socket. It defaults to Len(<cData>).

Return

The function returns a numeric value indicating the number of bytes sent to the socket. If the return value is smaller than <nBytes>, either no more bytes can be transmitted, or a network error ocurred. This can be identified using function INetErrorCode().

Description

Function INetSendAll() works exactly like INetSend(), except for not returning until all data is sent, the socket is prematurely closed, or a network error occurs, whichever comes first.

Info

See also:INetAccept(), INetConnect(), INetErrorCode(), INetRecv(), INetRecvAll(), INetRecvLine(), INetSend()
Category: Internet functions , Sockets functions , xHarbour extensions
Source:vm\INet.c
LIB:xhb.lib
DLL:xhbdll.dll


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