xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

INetClose()

Closes a connection on a socket.

Syntax

INetClose( <pSocket> ) --> nError

Arguments

<pSocket>
This is a pointer to a socket.

Return

The function returns zero on success, or -1 on failure.

Description

INetClose() closes a socket and notifies both ends of the connection. If threads are executing a blocking sockets function with <pSocket>, they will terminate their wait state and a socket error is set ("socket closed"). This causes all threads waiting on a blocking sockets function to resume so they can report a sockets error.

If the return value is not zero, use function INetErrorCode() to obtain information about failure.

Info

See also:INetAccept(), INetConnect(), INetDGram(), INetErrorCode()
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