@@ -191,12 +191,12 @@ public static function SW_blocksDecrypt( $socket,
191
191
socket_write ($ socket , $ str , strlen ($ str ));
192
192
$ rsp =socket_read ($ socket ,2 );
193
193
if ($ rsp == FALSE ){
194
- throw new Exception (socket_strerror ());
194
+ throw new Exception (socket_strerror (socket_last_error () ));
195
195
}
196
196
$ len = Bytes::bytesToShortBigEnd (Bytes::getBytes ($ rsp ), 0 );
197
197
$ rsp = socket_read ($ socket , $ len );
198
198
if ($ rsp == FALSE ){
199
- throw new Exception (socket_strerror ());
199
+ throw new Exception (socket_strerror (socket_last_error () ));
200
200
}
201
201
202
202
$ rv = intval (substr ($ rsp , 2 , 2 ));
@@ -286,12 +286,12 @@ public static function S3_Encrypt($socket,
286
286
socket_write ($ socket , $ str , strlen ($ str ));
287
287
$ rsp =socket_read ($ socket ,2 );
288
288
if ($ rsp == FALSE ){
289
- throw new Exception (socket_strerror ());
289
+ throw new Exception (socket_strerror (socket_last_error () ));
290
290
}
291
291
$ len = Bytes::bytesToShortBigEnd (Bytes::getBytes ($ rsp ), 0 );
292
292
$ rsp = socket_read ($ socket , $ len );
293
293
if ($ rsp == FALSE ){
294
- throw new Exception (socket_strerror ());
294
+ throw new Exception (socket_strerror (socket_last_error () ));
295
295
}
296
296
$ errCode = ($ rsp [2 ]&0xF ) * 10 + ($ rsp [3 ]&0xF );
297
297
if ($ errCode != 0 ){
0 commit comments