closesocket

Top  Previous  Next

The closesocket function closes an existing socket.

 

Syntax

int closesocket(

int socket

);

 

Parameters

socket

A descriptor identifying the socket to close.

 

Return value

Upon successful completion, closesocket returns 0; otherwise, -1 is returned and errno set to indicate the error.