Home  >  Article  >  Backend Development  >  How to close socket in php

How to close socket in php

藏色散人
藏色散人Original
2020-08-06 09:28:382897browse

In PHP, you can close a given socket resource through the "socket_close" function. This function is only valid for socket resources and cannot be used for other types of resource types. Its syntax is "socket_close (resource $socket ): void".

How to close socket in php

Recommended: "PHP Video Tutorial"

socket_close — Close the socket resource

Description¶

socket_close ( resource $socket ) : void

socket_close() will close the given socket resource. This function is only valid for socket resources and cannot be used on other types of resource types.

Parameters

socket

A valid socket resource created by socket_create() or socket_accept().

Return value

No return value.

The above is the detailed content of How to close socket in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn