??? PHP ?? ?? ??? ?? ? Workerman
Workerman? ?? ??? ?? ???? ??? ??? ?? ????? ?????? ??? ????? ?????. ???? Workerman \ Protocols \ Gateway
? ???? ??? ?? ????? ???? ???? ?? ?????. ? ????? ???? ??? ?? ???? ???? ??? ? ???? ?? ? ??? ????. "MyProtocol"??? ??? ?? ????? ??? ?? ???????. Workerman \ Protocols \ Gateway? ?????. ??? MyProtocol ?? ????? {public static function decode ($ buffer) {// ??? ?? ????? ?? ??? ??????. ???? // ?? ?? ??, ?? ?? ?? ??? ?? ???? ??? ? ????. ?? ?? : $ data = Explode ( ':', $ buffer); if (count ($ data) & lt; 2) {return null; // ???? ???} $ command = $ data [0]; $ payload = $ data [1]; ?? [ '??'= & gt; $ command, 'payload'= & gt; $ ????]; } public static function encode ($ data) {// ??? ?? ????? ?? ???? ??????. ??? ???? ?????. $ data [ 'command']? ?????. ':'. $ data [ 'payload']; }}}
??? Workerman ?? ???????? ??? ?? ????? ?????. myNamespace \ myProtocol? ??????; $ Worker = ? ??? ( 'tcp : //0.0.0.0 : 2345'); $ Worker- & gt; Protocol = New MyProtocol (); $ worker- & gt; onmessage = function ($ connection, $ data) {// ???? ??? ? ???? ?????. . json_encode ($ data). php_eol; $ connection- & gt; send (myProtocol :: encode ([ 'command'= & gt; 'response', 'payload'= & gt; 'Hello From Server!')); }; Worker :: Runall ();
? ??? ??? ?? ?? ????? ?????. ?? ????? ?? ???, ?? ???, ??? ???? ??? ?? ?? ??? ???? ?? ? ?? ? ? ????. ???? ?? ???? ?? ????? ??? ??? ???????.
??? ???? ??? ??? ????
Workerman? ?? ???
????? ???? ?? ???? ??? ??? ???? ?? ?????. ? ???
? ?? ????? ???? ?? ?? ?? ?? ?? ?? ??? ?? ??? ???? ?? ? ? ????. ??? ???
????, ?? ?? ? ??? ?? ???? ??? ? onmessage
???? ????? ?? ? ? ????. myNamespace \ myProtocol? ??????; ??namespace \ OtherProtocol? ??????. // ??? ? ?? ??? ?? ???? $?? ????? $ worker1 = new Worker ( 'tcp : //0.0.0.0 : 2345'); $ worker1- & gt; protocol = new myProtocol (); // ... myProtocol? ?? ... $ worker2 = new Worker ( 'tcp : //0.0.0.0 : 2346'); $ worker2- & gt; protocol = new OtherProtocol (); // ... ?? ????? ?? ... Worker :: Runall ();
?? ?? ??? ???? ?? ?? ??? ?? ? ??? ??? ?? ? ? ??????. ??? ?? ??? ???? ??? ? ?? ??? ???? ?? ?? ????.
??? ?? ????? ??? ? ????? ?? ??
??? ?? ????? ?? ? ? ??? ?? ?????. ?? ??? ??? ????.
- ?? ??? ?? : ?? ???? ?? ???? ???? ??????. ????? ?? ???? ???? ????. ?? ?????? ???? ?? ???? ???? ??????. ??? ?? ??? ??, ???? ?? ?? ?? ??? ? ??? ??????.
- ?? ? ?? : ??? ?? ? ?? ????? ???? ?????? ??? ???? ???? ?? ???? ??????. ??? ????? ?? TLS/SSL? ?? ?? ? ?? ????? ???? ?? ??????.
- ?? ?? : ??? ???? ??????. ?? ????? ??? ??? ???? ????. ??? ? ?? ??? ???? ?? ??.
- ??? ??? : ??? ?? ?? ??? ???? ??? ???? ???? ??? ?????.
- ??? ? ?? ?? : ????? ???? ?? ? ?? ??? ??????. ?? ?? ?? ??? ?? ????? ???? ?? ? ??? ???? ??????.
- ???? ?? ?? : ????? ? ?? ??? ??? ?? ? ?????.
Workser Man Can Can Can Can Cancer? ??? ?? ???? ??? ????? ???????. ??? ???? ?????. - ?? : ???? ??? ???? ??? ??? ???? ??? ???? ??? ? ??? ?????. ?? ?? ??? ? ????? ?? ?? ???? ??? ???.
- ?? ? (??? ??) : ????? ?? ?
print_r ()
?? var_dump ()
?? ???? ?? ??? ??? ???? ???? ???? ? ??? ? ? ????. - Debuggers (Xdebug) : Xdebug? ?? ???? ???? ??? ?? ??? ???? ?? ??? ???????. ?? ?? ??? ???? ?? ??? ?? ? ?? ??? ?????.
- ???? ???? ?? (Wireshark, TCPDump) : Wireshark ?? TCPDump? ?? ??? ???? ???? ???? ?? ? ??? ?????? ???? ?? ? ?? ???? ?? ? ? ????. ??? ?? ??? ??? ?? ??? ?? ??? ???? ???? ? ?? ??????.
- ?? ??? : ?? ??? ??
encode
? decode
??? ???? ??????. ?? ?? ???? ??? ???? ??? ?? ????? ???? ?? ? ? ??????.
print_r ()
?? var_dump ()
?? ???? ?? ??? ??? ???? ???? ???? ? ??? ? ? ????. encode
? decode
??? ???? ??????. ?? ?? ???? ??? ???? ??? ?? ????? ???? ?? ? ? ??????. ??? ??? ??? ???? ??? ????? ?? ???? Workerman ??? ?? ??? ??? ?? ????? ??? ??? ?? ? ? ????. ????? ???? ??? ??? ?? ??? ??? ??? ???????.
? ??? Workerman? ?? ????? ??? ??????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??









