Update for amphp/socket v2.0

This commit is contained in:
Aaron Piotrowski 2023-01-31 19:31:59 -06:00
parent afb1409ddd
commit 0c4fd69bb2
No known key found for this signature in database
GPG Key ID: 5B456E6AABA44A63
2 changed files with 2 additions and 3 deletions

View File

@ -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,
) {

View File

@ -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);