Results of 1 - 10 of about 86 for Sockets (0.003 sec.)
- stream_socket_pair — 接続された、区別できないソケットストリームの組を作成する |... 15147
- stream_socket_pair (PHP 5 >= 5.1.0, PHP 7, PHP 8) stream_socket_pair — 接続された、区別できないソケットストリームの組を作成する 説明 function stream_socket_pair ( int $domain , int $type , int $protocol ): array | false stream_socket_pair()
... 例1 stream_socket_pair() の例 この例では、プロセス間通信に stream_socket_pair() を使用する基本的な方法を示します。 <?php $sockets = stream_socket_pair ( STREAM_PF_UNIX , STREAM_SOCK_STREAM , STREAM_IPPROTO_IP ); $pid = pcntl_fork (); if ( $pid == - 1 ) ... { die( 'フォークできません' ); } else if ( $pid ) { /* 親プロセス */ fclose ( $sockets [ 0 ]); fwrite ( $sockets [ 1 ], "子プロセスの PID: $pid \n" ); echo fgets ( $sockets [ 1 ]); fclose ( $sockets [ 1 ]); } ... else { /* 子プロセス */ fclose ( $sockets [ 1 ]); fwrite ( $sockets [ 0 ], "子プロセスからのメッセージ\n" ); echo fgets ( $sockets [ 0 ]); fclose ( $sockets [ 0 ]); ...
-
https://man.mtool.work/php/8.3/function.stream-socket-pair.html
- socket_create_pair — 区別できないソケットの組を作成し、配列に保存する | PHP 8.3 11548
- socket_create_pair (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) socket_create_pair — 区別できないソケットの組を作成し、配列に保存する 説明 function socket_create_pair ( int $domain , int $type , int $protocol , array &$pair ): bool socket_create_p
... スになりました。 これより前のバージョンでは、リソースの配列へのリファレンスでした。 例 例1 socket_create_pair() の例 <?php $sockets = array(); /* Windows では AF_INET を使う必要があります */ $domain = ( strtoupper ( substr ( PHP_OS , 0 , 3 )) == 'WIN' ? ... AF_INET : AF_UNIX ); /* ソケットの組の設定 */ if ( socket_create_pair ( $domain , SOCK_STREAM , 0 , $sockets ) === false ) { echo "socket_create_pair failed. Reason: " . socket_strerror ( socket_last_error ()); } /* データの送受信 ... */ if ( socket_write ( $sockets [ 0 ], "ABCdef123\n" , strlen ( "ABCdef123\n" )) === false ) { echo "socket_write() failed. Reason: " . socket_strerror ( ...
-
https://man.mtool.work/php/8.3/function.socket-create-pair.html
- The Swoole\Event class | PHP 8.3 9945
- The Swoole\Event class (PECL swoole >= 1.9.0) はじめに The Swoole extension provides low-level interfaces to directly manipulate the underlying epoll/kqueue/poll/select event loop. It allows adding sockets created by other extensions or PHP
... Resources created by stream_socket_client/fsockopen. socket resource resource Resources created by socket_create from the sockets extension require the --enable-sockets flag during Swoole compilation. object object Swoole automatically converts Swoole\ ... Process into UnixSocket and Swoole\Client into connected client sockets at the underlying level. クラス概要 class Swoole\Event { /* メソッド */ public static function add ( mixed $sock , callabl ...
-
https://man.mtool.work/php/8.3/class.swoole-event.html
- ZMQContext::__construct — Construct a new ZMQContext object | PHP 8.3 9824
- ZMQContext::__construct (PECL zmq >= 0.5.0) ZMQContext::__construct — Construct a new ZMQContext object 説明 public function ZMQContext::__construct ( int $io_threads = 1 , bool $is_persistent = true ) Constructs a new ZMQ context. The cont
... ext is used to initialize sockets. A persistent context is required to initialize persistent sockets. パラメータ io_threads Number of io-threads in the cont ... Whether the context is persistent. Persistent context is stored over multiple requests and is a requirement for persistent sockets. エラー / 例外 Throws ZMQContextException if context initialization fails. 例 例1 A ZMQContext() example Construct a new c ...
-
https://man.mtool.work/php/8.3/zmqcontext.construct.html
- The EventListener class | PHP 8.3 8705
- The EventListener class (PECL event >= 1.5.0) はじめに Represents a connection listener. クラス概要 final class EventListener { /* 定数 */ const int OPT_LEAVE_SOCKETS_BLOCKING = 1 ; const int OPT_CLOSE_ON_FREE = 2 ; const int OPT_CLOSE_ON_E
... ロパティ fd Numeric file descriptor of the underlying socket. (Added in event-1.6.0 .) 定義済み定数 EventListener::OPT_LEAVE_SOCKETS_BLOCKING By default Libevent turns underlying file descriptors, or sockets, to non-blocking mode. This flag tells Libevent ...
-
https://man.mtool.work/php/8.3/class.eventlistener.html
- EventHttp::accept — Makes an HTTP server accept connections on the specified so... 8328
- EventHttp::accept (PECL event >= 1.2.6-beta) EventHttp::accept — Makes an HTTP server accept connections on the specified socket stream or resource 説明 public function EventHttp::accept ( mixed $socket ): bool Makes an HTTP server accept c
... onnections on the specified socket stream or resource. The socket should be ready to accept connections. Can be called multiple times to accept connections on ... different sockets. 注意 : To bind a socket, listen , and accept connections on the socket in a single call use EventHttp::bind() . EventHttp ... ::accept() is needed only if one already has a socket ready to accept connections. パラメータ socket Socket resource, stream or numeric file descriptor representing a socket ready to accept connections. 戻り値 成功した場合に ...
-
https://man.mtool.work/php/8.3/eventhttp.accept.html
- EventConfig::requireFeatures — Enters a required event method feature that the ... 8206
- EventConfig::requireFeatures (PECL event >= 1.2.6-beta) EventConfig::requireFeatures — Enters a required event method feature that the application demands 説明 public function EventConfig::requireFeatures ( int $feature ): bool Enters a req
... ); ( $base -> getFeatures () & EventConfig :: FEATURE_FDS ) and print "FDS - arbitrary file descriptor types, and not just sockets\n" ; } ?> 上の例の出力は、 たとえば以下のようになります。 FDS feature is now required FDS - arbitrary file descriptor type ... s, and not just sockets 参考 EventBase::getFeatures() - Returns bitmask of features supported 他のマニュアルの関連ページ Django 5.1.6 Linux JM fan ...
-
https://man.mtool.work/php/8.3/eventconfig.requirefeatures.html
- Swoole\Event::add — Add a socket to the underlying reactor event listener | PHP... 7843
- Swoole\Event::add (PECL swoole >= 1.9.0) Swoole\Event::add — Add a socket to the underlying reactor event listener 説明 public static function Swoole\Event::add ( mixed $sock , callable $read_callback , callable $write_callback = ? , int $f
... ify the corresponding callback functions and event types for the socket. パラメータ sock File descriptor, stream resource, sockets resource, or object. read_callback Callback function for readable events. write_callback Callback function for writable ev ... fp ); fclose ( $fp ); }); echo "Finish\n" ; ?> 他のマニュアルの関連ページ Python timerfd Python asyncio-llapi-index Python sockets Python ssl Python sys.monitoring Linux JM epoll(7) ...
-
https://man.mtool.work/php/8.3/swoole-event.add.html
- dl — 実行時に PHP 拡張モジュールをロードする | PHP 8.3 7708
- dl (PHP 4, PHP 5, PHP 7, PHP 8) dl — 実行時に PHP 拡張モジュールをロードする 説明 function dl ( string $extension_filename ): bool extension_filename で指定された PHP 拡張モジュールを読み込みます。 その拡張モジュールが既に使用可能かどうかを
... 定できるのは拡張モジュールの ファイル名 だけ であり、それはプラットフォームに依存します。 例えば、Unix プラットフォームでは sockets 拡張モジュール (共有モジュールとしてコンパイルされていれば。デフォルトでは有りません!) は sockets.so と呼ばれていますし、一 ... 方 Windows プラットフォームでは php_sockets.dll と呼ばれます。 拡張モジュールを読み込むディレクトリは、プラットフォームによって異なります。 Windows - php.ini に明記さ ...
-
https://man.mtool.work/php/8.3/function.dl.html
- Swoole\Event::write — Write data to socket asynchronously | PHP 8.3 7708
- Swoole\Event::write (PECL swoole >= 1.9.0) Swoole\Event::write — Write data to socket asynchronously 説明 public static function Swoole\Event::write ( mixed $fd , mixed $data ): bool Makes data sending asynchronous for stream/sockets resour
... (all data written) or total failure (nothing written). 警告 Event::write cannot be used with SSL/TLS-encrypted streams or sockets (tunneled connections). 警告 Upon successful execution, Event::write will automatically switch the $socket to non-blocking ...
-
https://man.mtool.work/php/8.3/swoole-event.write.html