How to close socket in php

藏色散人
Release: 2023-03-03 21:00:01
Original
2969 people have browsed it

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!