Function Reference


TCPShutdown, UDPShutdown

Stops TCP/UDP services.

TCPShutdown ( )
UDPShutdown ( )

Return Value

Success: 1.
Failure: 0 and sets the @error flag to non-zero.
@error: Windows API WSACleanup return value (see MSDN).

Remarks

A script must call one TCPShutdown() call for every successful TCPStartup() call.
UDPShutdown() is just an alias of TCPShutdown().

Related

TCPCloseSocket, TCPListen, TCPStartup, UDPCloseSocket

Example

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