lib/rpc-client/client.js
function rpcToSpecifiedServer(client, msg, serverType, routeParam, cb) {
    if (typeof routeParam !== 'string') {
        logger.error('[dreamix-rpc] server id is not a string, server id: %j', routeParam);
        return;
    }
    if (routeParam === '*') {
        const servers = client._station.servers;
        async.each(Object.keys(servers), (serverId, next) => {
            const server = servers[serverId];
            if (server.serverType === serverType) {
                client.rpcInvoke(serverId, msg, (err) => {
                    next(err);
                });
            }
        }, cb);
    }
    client.rpcInvoke(routeParam, msg, cb);
}
function rpcToSpecifiedServer(client, msg, serverType, routeParam, cb) {
    if (typeof routeParam !== 'string') {
        logger.error('[dreamix-rpc] server id is not a string, server id: %j', routeParam);
        return;
    }
    if (routeParam === '*') {
        const servers = client._station.servers;
        async.each(Object.keys(servers), (serverId, next) => {
            const server = servers[serverId];
            if (server.serverType === serverType) {
                client.rpcInvoke(serverId, msg, (err) => {
                    next(err);
                });
            }
        }, cb);
    }
    client.rpcInvoke(routeParam, msg, cb);
}
function rpcToSpecifiedServer ( client , msg , serverType , routeParam , cb ) { if ( typeof routeParam !== 'string' ) { logger . error ( '[dreamix-rpc] server id is not a string, server id: %j' , routeParam ) ; return ; } if ( routeParam === '*' ) { const servers = client . _station . servers ; async . each ( Object . keys ( servers ) , ( serverId , next ) => { const server = servers [ serverId ] ; if ( server . serverType === serverType ) { client . rpcInvoke ( serverId , msg , ( err ) => { next ( err ) ; } ) ; } } , cb ) ; } client . rpcInvoke ( routeParam , msg , cb ) ; }
client has closed 
Rpc to specified server id or servers.

@param client {Object} current client instance.
@param msg {Object} rpc message.
@param serverType {String} remote server type.
@param routeParam {Object} mailbox init context parameter.
@param cb {Function} callback.
@api private
client has closed Rpc to specified server id or servers .