How to use the ice.Glacier2 function in ice

To help you get started, we’ve selected a few ice examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zeroc-ice / ice-demos / js / Glacier2 / simpleChat / Client.js View on Github external
// **********************************************************************
//
// Copyright (c) 2003-2018 ZeroC, Inc. All rights reserved.
//
// **********************************************************************

const Ice = require("ice").Ice;
const Glacier2 = require("ice").Glacier2;
const Demo = require("./generated/Chat").Demo;

(async function()
{
    //
    // Servant that implements the ChatCallback interface,
    // the message operation just writes the received data
    // to stdout.
    //
    class ChatCallbackI extends Demo.ChatCallback
    {
        message(data)
        {
            console.log(data);
        }
    }