Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 3267898

Browse files
committed
Updated kernel info message format
1 parent 5e2efa4 commit 3267898

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/Actions/KernelInfoAction.php

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33

44
namespace Litipk\JupyterPHP\Actions;
55

6-
76
use Litipk\JupyterPHP\JupyterBroker;
87
use React\ZMQ\SocketWrapper;
98

10-
119
final class KernelInfoAction implements Action
1210
{
1311
/** @var JupyterBroker */
@@ -34,30 +32,28 @@ public function __construct(JupyterBroker $broker, SocketWrapper $shellSocket, S
3432

3533
public function call(array $header, array $content, $zmqId = null)
3634
{
37-
// TODO: Implement call() method.
35+
$this->broker->send($this->iopubSocket, 'status', ['execution_state' => 'busy'], $header);
3836

39-
$this->broker->send(
40-
$this->iopubSocket, 'status', ['execution_state' => 'busy'], $header
41-
);
42-
4337
$this->broker->send(
4438
$this->shellSocket,
4539
'kernel_info_reply',
4640
[
47-
'protocol_version' => '5.0.0',
41+
'protocol_version' => '5.0',
4842
'implementation' => 'jupyter-php',
4943
'implementation_version' => '0.1.0',
5044
'banner' => 'Jupyter-PHP Kernel',
51-
'language' => 'PHP',
52-
'language_version' => phpversion(),
5345
'language_info' => [
5446
'name' => 'PHP',
5547
'version' => phpversion(),
5648
'mimetype' => 'text/x-php',
5749
'file_extension' => '.php',
58-
'pygments_lexer' => 'PHP'
59-
]
60-
]
50+
'pygments_lexer' => 'PHP',
51+
],
52+
'status' => 'ok',
53+
],
54+
$header,
55+
[],
56+
$zmqId
6157
);
6258

6359
$this->broker->send($this->iopubSocket, 'status', ['execution_state' => 'idle'], $header);

0 commit comments

Comments
 (0)