mirror of
https://github.com/amphp/parallel.git
synced 2025-01-16 20:28:21 +01:00
Update for amphp/socket v2.0
This commit is contained in:
parent
afb1409ddd
commit
0c4fd69bb2
@ -35,7 +35,7 @@ final class SocketIpcHub implements IpcHub
|
||||
* @param positive-int $keyLength Length of the random key exchanged on the IPC channel when connecting.
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly Socket\SocketServer $server,
|
||||
private readonly Socket\ServerSocket $server,
|
||||
float $keyReceiveTimeout = self::DEFAULT_KEY_RECEIVE_TIMEOUT,
|
||||
private readonly int $keyLength = self::DEFAULT_KEY_LENGTH,
|
||||
) {
|
||||
|
@ -5,7 +5,6 @@ namespace Amp\Parallel\Ipc;
|
||||
use Amp\ByteStream\ReadableResourceStream;
|
||||
use Amp\Cancellation;
|
||||
use Amp\Socket;
|
||||
use Amp\Socket\EncryptableSocket;
|
||||
use Amp\Socket\SocketConnector;
|
||||
use Revolt\EventLoop;
|
||||
|
||||
@ -60,7 +59,7 @@ function connect(
|
||||
string $key,
|
||||
?Cancellation $cancellation = null,
|
||||
?SocketConnector $connector = null,
|
||||
): EncryptableSocket {
|
||||
): Socket\Socket {
|
||||
$connector ??= Socket\socketConnector();
|
||||
|
||||
$client = $connector->connect($uri, cancellation: $cancellation);
|
||||
|
Loading…
x
Reference in New Issue
Block a user