shutdown socket

Posted on 2012-01-15 23:26  无忧consume  阅读(262)  评论(0编辑  收藏  举报

The shutdown function disables sends or receives on a socket.

Syntax 

int shutdown(  __in  SOCKET s,  __in  int how);

Parameters

s [in]

A descriptor identifying a socket.

how [in]

A flag that describes what types of operation will no longer be allowed. Possible values for this flag are listed in theWinsock2.h header file.

ValueMeaning
SD_RECEIVE
0

Shutdown receive operations.

SD_SEND
1

Shutdown send operations.

SD_BOTH
2

Shutdown both send and receive operations.

Copyright © 2024 无忧consume
Powered by .NET 9.0 on Kubernetes