1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
/***************************************************************************
* Copyright (c) 2016, Johan Mabille and Sylvain Corlay *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/
#include <chrono>
#include <iostream>
#include <thread>
#include "xeus/xkernel.hpp"
#include "xeus/xkernel_configuration.hpp"
#include "xeus-zmq/xzmq_context.hpp"
#include "xeus-zmq/xserver_zmq.hpp"
#include "xmock_interpreter.hpp"
int main(int /*argc*/, char* /*argv*/[])
{
using namespace std::chrono_literals;
xeus::xconfiguration config;
config.m_transport = "ipc";
config.m_ip = "localhost";
config.m_control_port = "control";
config.m_shell_port = "shell";
config.m_stdin_port = "stdin";
config.m_iopub_port = "iopub";
config.m_hb_port = "heartbeat";
config.m_signature_scheme = "none";
config.m_key = "";
auto context = xeus::make_zmq_context();
using interpreter_ptr = std::unique_ptr<xeus::xmock_interpreter>;
interpreter_ptr interpreter = interpreter_ptr(new xeus::xmock_interpreter());
xeus::xkernel kernel(config,
xeus::get_user_name(),
std::move(context),
std::move(interpreter),
xeus::make_xserver_default);
std::cout << "starting kernel" << std::endl;
kernel.start();
return 0;
}
|