改名
This commit is contained in:
@@ -6,6 +6,8 @@ use Annotation\Annotation;
|
||||
use Annotation\Inject;
|
||||
use Http\Handler\Router;
|
||||
use Kiri\Abstracts\Component;
|
||||
use Kiri\Abstracts\Config;
|
||||
use Kiri\Di\ContainerInterface;
|
||||
use Kiri\Di\NoteManager;
|
||||
use Kiri\Kiri;
|
||||
use Server\SInterface\OnCloseInterface;
|
||||
@@ -31,6 +33,10 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa
|
||||
public Annotation $annotation;
|
||||
|
||||
|
||||
#[Inject(ContainerInterface::class)]
|
||||
public ContainerInterface $container;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \Exception
|
||||
@@ -56,6 +62,12 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa
|
||||
}
|
||||
}
|
||||
}
|
||||
$config = Config::get('rpc.pool', null);
|
||||
if (!is_null($config)) {
|
||||
$this->container->mapping(RpcClientInterface::class, JsonRpcPoolTransporter::class);
|
||||
} else {
|
||||
$this->container->mapping(RpcClientInterface::class, JsonRpcTransporter::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user