stream_socket_sendto
symfony/var-dumper
Supported Versions: PHP 5, PHP 7, PHP 8
Sends a message to a socket, whether it is connected or not
stream_socket_sendto
(
resource $socket
,
string $data
,
int $flags
=
0
,
string $address
=
""
):
int
|
false
set_error_handler
([
self
::class,
'nullErrorHandler'
]);
try {
if (-
1
!==
stream_socket_sendto
(
$this
->
socket
,
$encodedPayload
)) {
return
true
;
}
if (!
$socketIsFresh
) {
Server/Connection.php
fclose
(
$this
->
socket
);
$this
->
socket
=
$this
->
createSocket
();
}
if (-
1
!==
stream_socket_sendto
(
$this
->
socket
,
$encodedPayload
)) {
return
true
;
}
} finally {
Server/Connection.php