Created
September 2, 2022 16:54
-
-
Save yasudacloud/76cd5de2755fde0682064e8d08b696ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$address = "unix://\0testtest"; | |
$socket = stream_socket_server($address, $errorCode, $errorMessage); | |
if (!$socket) { | |
throw new Exception('Failed Socket Server'); | |
} | |
while ($conn = stream_socket_accept($socket, 65535)) { | |
print("@receive"); | |
fwrite($conn, 'Server Message' . "\n"); | |
fclose($conn); | |
} | |
fclose($socket); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment