Fossil

Diff
Login

Diff

Differences From Artifact [6d14a9c8e2]:

To Artifact [c9dba13158]:


117
118
119
120
121
122
123

124
125
126
127
128
129
130
/*
** Close the currently open socket.  If no socket is open, this routine
** is a no-op.
*/
void socket_close(void){
  if( iSocket>=0 ){
#if defined(_WIN32)

    closesocket(iSocket);
#else
    close(iSocket);
#endif
    iSocket = -1;
  }
}







>







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
** Close the currently open socket.  If no socket is open, this routine
** is a no-op.
*/
void socket_close(void){
  if( iSocket>=0 ){
#if defined(_WIN32)
    if( shutdown(iSocket,1)==0 ) shutdown(iSocket,0);
    closesocket(iSocket);
#else
    close(iSocket);
#endif
    iSocket = -1;
  }
}