in src/org/jetbrains/plugins/ipnb/protocol/IpnbConnection.java [345:375]
protected void initializeClients() throws URISyntaxException {
final Draft draft = new Draft17WithOrigin();
myShellClient = new WebSocketClient(getShellURI(), draft, myHeaders, 0) {
@Override
public void onOpen(@NotNull ServerHandshake handshakeData) {
final Message message = createMessage("connect_request", UUID.randomUUID().toString(), null, null);
send(new Gson().toJson(message));
myIsShellOpen = true;
notifyOpen();
}
@Override
public void onMessage(@NotNull String message) {
}
@Override
public void onClose(int code, @NotNull String reason, boolean remote) {
}
@Override
public void onError(@NotNull Exception e) {
}
};
myShellThread = new Thread(myShellClient, "IPNB shell client");
myShellThread.start();
myIOPubClient = new IpnbWebSocketClient(getIOPubURI(), draft);
myIOPubThread = new Thread(myIOPubClient, "IPNB pub client");
myIOPubThread.start();
}