Results of 1 - 10 of about 101 for sockets (0.002 sec.)
- 接続された、区別できないソケットストリームの組を作成する 12063
- « stream_socket_get_name stream_socket_recvfrom » PHP Manual ストリーム 関数 接続された、区別できないソケットストリームの組を作成する 検索 stream_socket_pair (PHP 5 >= 5.1.0, PHP 7, PHP 8) 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
- 接続された、区別できないソケットストリームの組を作成する 12063
- « stream_socket_get_name stream_socket_recvfrom » PHP Manual ストリーム 関数 接続された、区別できないソケットストリームの組を作成する 検索 stream_socket_pair (PHP 5 >= 5.1.0, PHP 7, PHP 8) 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
- 区別できないソケットの組を作成し、配列に保存する 9819
- « socket_create_listen socket_export_stream » PHP Manual ソケット 関数 区別できないソケットの組を作成し、配列に保存する 検索 socket_create_pair (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) socket_create_pair — 区別できないソケットの組を作成し、配列
... スになりました。 これより前のバージョンでは、リソースの配列へのリファレンスでした。 例 例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
- 区別できないソケットの組を作成し、配列に保存する 9741
- « socket_create_listen socket_export_stream » PHP Manual ソケット 関数 区別できないソケットの組を作成し、配列に保存する 検索 socket_create_pair (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) socket_create_pair — 区別できないソケットの組を作成し、配列
... スになりました。 これより前のバージョンでは、リソースの配列へのリファレンスでした。 例 例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
- Construct a new ZMQContext object 9171
- « ZMQContext ZMQContext::getOpt » PHP Manual ZMQContext Construct a new ZMQContext object 検索 ZMQContext::__construct (PECL zmq >= 0.5.0) ZMQContext::__construct — Construct a new ZMQContext object 説明 public function ZMQContext::__constr
... uct ( int $io_threads = 1 , bool $is_persistent = true ) Constructs a new ZMQ context. The context 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 ... ge = $socket -> recv (); ?> 関連キーワード: ZMQContext context new socket persistent Construct object construct io threads sockets initialize example request Search getOpt zmq function int bool ...
-
https://man.mtool.work/php/8.3/zmqcontext.construct.html
- Construct a new ZMQContext object 9093
- « ZMQContext ZMQContext::getOpt » PHP Manual ZMQContext Construct a new ZMQContext object 検索 ZMQContext::__construct (PECL zmq >= 0.5.0) ZMQContext::__construct — Construct a new ZMQContext object 説明 public function ZMQContext::__constr
... uct ( int $io_threads = 1 , bool $is_persistent = true ) Constructs a new ZMQ context. The context 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 ... onse */ $message = $socket -> recv (); ?> 関連キーワード: ZMQContext context socket persistent Construct construct threads sockets initialize example request getOpt Constructs used required Number Whether Persistent stored over multiple requests require ...
-
https://man.mtool.work/php/8.3/zmqcontext.construct.html
- The Swoole\Event class 8937
- « Swoole\Coroutine\Lock::unlock Swoole\Event::add » PHP Manual Swoole The Swoole\Event class 検索 The Swoole\Event class (PECL swoole >= 1.9.0) はじめに The Swoole extension provides low-level interfaces to directly manipulate the underlyin
... g epoll/kqueue/poll/select event loop. It allows adding sockets created by other extensions or PHP's stream/socket extensions to Swoole's EventLoop. 注意 : The Event module is low-level, ... 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
- The Swoole\Event class 8937
- « Swoole\Coroutine\Lock::unlock Swoole\Event::add » PHP Manual Swoole The Swoole\Event class 検索 The Swoole\Event class (PECL swoole >= 1.9.0) はじめに The Swoole extension provides low-level interfaces to directly manipulate the underlyin
... g epoll/kqueue/poll/select event loop. It allows adding sockets created by other extensions or PHP's stream/socket extensions to Swoole's EventLoop. 注意 : The Event module is low-level, ... 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
- Enters a required event method feature that the application demands 7964
- « EventConfig::__construct EventConfig::setFlags » PHP Manual EventConfig Enters a required event method feature that the application demands 検索 EventConfig::requireFeatures (PECL event >= 1.2.6-beta) EventConfig::requireFeatures — Enters
... ); ( $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 関連キーワード: EventConfig feature required event r ... equireFeatures Enters method application demands base EventBase features getFeatures arbitrary descriptor types sockets construct setFlags beta Bitmask constants 成功 example Create ...
-
https://man.mtool.work/php/8.3/eventconfig.requirefeatures.html
- Makes an HTTP server accept connections on the specified socket stream or resour... 7886
- « EventHttp EventHttp::addServerAlias » PHP Manual EventHttp Makes an HTTP server accept connections on the specified socket stream or resource 検索 EventHttp::accept (PECL event >= 1.2.6-beta) EventHttp::accept — Makes an HTTP server accep
... t connections on the specified socket stream or resource 説明 public function EventHttp::accept ( mixed $socket ): bool Makes an HTTP server accept connections o ... n 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 ...
-
https://man.mtool.work/php/8.3/eventhttp.accept.html