TCPShutdown, UDPShutdown
停止 TCP/UDP 服务.
TCPShutdown ( )
UDPShutdown ( )
返回值
成功:
|
返回 1.
|
失败:
|
返回 0, @error 设置 为非 0 值.
|
@error:
|
windows API WSACleanup 的返回值 (请查阅 MSDN).
|
备注
每当成功完成 TCPStartup() 调用后,必须调用 TCPShutdown() 关闭网络通信.
UDPShutdown() 是 TCPShutdown() 的一个别名.
相关
TCPCloseSocket, TCPListen, TCPStartup, UDPCloseSocket
函数示例
Close the TCP service.
Example()
Func Example()
TCPStartup() ; Start the TCP service.
; Register OnAutoItExit to be called when the script is closed.
OnAutoItExitRegister("OnAutoItExit")
EndFunc ;==>Example
Func OnAutoItExit()
TCPShutdown() ; Close the TCP service.
EndFunc ;==>OnAutoItExit
Close the UDP service
Example()
Func Example()
UDPStartup() ; Start the UDP service.
; Register OnAutoItExit to be called when the script is closed.
OnAutoItExitRegister("OnAutoItExit")
EndFunc ;==>Example
Func OnAutoItExit()
UDPShutdown() ; Close the UDP service.
EndFunc ;==>OnAutoItExit
----------------------------------------
|