1 | <?php |
||
50 | class CurlComm extends Curl { |
||
|
|||
51 | |||
52 | /** |
||
53 | * Extra msg will be added when comm |
||
54 | * Notice: Avoid conflict with other msg. |
||
55 | * @var array |
||
56 | */ |
||
57 | public $aMsgExtra = array(); |
||
58 | |||
59 | /** |
||
60 | * Algorithm of crypt |
||
61 | * @var string |
||
62 | */ |
||
63 | public $sCryptAlgo = 'blowfish'; |
||
64 | |||
65 | /** |
||
66 | * Key of crypt |
||
67 | * @var string |
||
68 | */ |
||
69 | public $sCryptKey = ''; |
||
70 | |||
71 | /** |
||
72 | * Url of remote site |
||
73 | * @var string |
||
74 | */ |
||
75 | public $sUrlRemote = ''; |
||
76 | |||
77 | |||
78 | /** |
||
79 | * Constructor |
||
80 | * |
||
81 | * @param array $ar_cfg |
||
82 | */ |
||
83 | public function __construct($ar_cfg = array()) { |
||
97 | |||
98 | |||
99 | /** |
||
100 | * Destructor |
||
101 | */ |
||
102 | public function __destruct() { |
||
108 | |||
109 | |||
110 | /** |
||
111 | * Server receive msg from client, call treat func |
||
112 | * and return msg to client. |
||
113 | */ |
||
114 | protected function CommReceive() { |
||
138 | |||
139 | |||
140 | /** |
||
141 | * Call action func, return result |
||
142 | * |
||
143 | * @param array $ar_req |
||
144 | * @return array |
||
145 | */ |
||
146 | protected function CommReturn($ar_req) { |
||
160 | |||
161 | |||
162 | /** |
||
163 | * Return hello msg to CommSendTest |
||
164 | * |
||
165 | * @see CommSendTest() |
||
166 | * @param array $ar_req |
||
167 | * @return array |
||
168 | */ |
||
169 | protected function CommReturnHello($ar_req = array()) { |
||
179 | |||
180 | |||
181 | /** |
||
182 | * Send msg to server, got result |
||
183 | * |
||
184 | * @param array $msg |
||
185 | * @return array |
||
186 | */ |
||
187 | public function CommSend($msg) { |
||
201 | |||
202 | |||
203 | /** |
||
204 | * Send signal to server to test remote url readable |
||
205 | * |
||
206 | * @return int 0/ok, other error. |
||
207 | */ |
||
208 | public function CommSendTest() { |
||
229 | |||
230 | |||
231 | /** |
||
232 | * Decrypt msg, include json treat |
||
233 | * |
||
234 | * @param string $msg |
||
235 | * @return string |
||
236 | */ |
||
237 | protected function MsgDecrypt($msg) { |
||
242 | |||
243 | |||
244 | /** |
||
245 | * Encrypt msg, include json treat |
||
246 | * |
||
247 | * @param array $ar_msg Array |
||
248 | * @return string |
||
249 | */ |
||
250 | protected function MsgEncrypt($ar_msg) { |
||
255 | |||
256 | |||
257 | /** |
||
258 | * Read and set config |
||
259 | * |
||
260 | * @param array $ar_cfg |
||
261 | * @return $this |
||
262 | */ |
||
263 | public function SetCfg($ar_cfg = array()) { |
||
271 | |||
272 | |||
273 | } // end of class CurlComm |
||
274 | ?> |
||
275 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.