-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from anutosh491/ipc
Updating the ipc client based on the new client framework
- Loading branch information
Showing
4 changed files
with
91 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/*************************************************************************** | ||
* 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 "xipc_client.hpp" | ||
|
||
namespace xeus | ||
{ | ||
|
||
xipc_client::xipc_client(xcontext& context, const xconfiguration& config) | ||
: p_client(make_xclient_zmq(context, config)) | ||
{ | ||
} | ||
|
||
void xipc_client::send_on_shell(xmessage msg) | ||
{ | ||
p_client->send_on_shell(std::move(msg)); | ||
} | ||
|
||
std::optional<xmessage> xipc_client::check_shell_answer() | ||
{ | ||
return p_client->check_shell_answer(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/*************************************************************************** | ||
* 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. * | ||
****************************************************************************/ | ||
|
||
#ifndef XEUS_IPC_CLIENT_HPP | ||
#define XEUS_IPC_CLIENT_HPP | ||
|
||
#include "xeus-zmq/xclient_zmq.hpp" | ||
|
||
namespace xeus | ||
{ | ||
class xipc_client | ||
{ | ||
public: | ||
using client_ptr = std::unique_ptr<xclient_zmq>; | ||
|
||
xipc_client(xcontext& context, const xconfiguration& config); | ||
|
||
void send_on_shell(xmessage msg); | ||
std::optional<xmessage> check_shell_answer(); | ||
|
||
private: | ||
client_ptr p_client; | ||
}; | ||
} | ||
|
||
#endif |