Exemplo n.º 1
0
        public SafeTaskHandle ping2(
            string val,
            pingCallback callback,
            int timeout_milliseconds = 0,
            int reply_thread_hash    = 0,
            ulong request_hash       = 0,
            RpcAddress server        = null)
        {
            var s = new RpcWriteStream(echoHelper.RPC_ECHO_ECHO_PING, timeout_milliseconds, request_hash);

            s.Write(val);
            s.Flush();

            return(RpcCallAsync2(
                       server ?? _server,
                       s,
                       this,
                       (err, rs) =>
            {
                string resp;
                rs.Read(out resp);
                callback(err, resp);
            },
                       reply_thread_hash
                       ));
        }
Exemplo n.º 2
0
 public void ping(
     string val, 
     pingCallback callback,
     int timeout_milliseconds = 0, 
     int reply_thread_hash = 0,
     ulong request_hash = 0,
     RpcAddress server = null)
 {
     var s = new RpcWriteStream(echoHelper.RPC_ECHO_ECHO_PING, timeout_milliseconds, request_hash);
     s.Write(val);
     s.Flush();
     
     RpcCallAsync(
                 server ?? _server, 
                 s,
                 this, 
                 (err, rs) => 
                     { 
                         string resp;
                         rs.Read(out resp);
                         callback(err, resp);
                     },
                 reply_thread_hash
                 );
 }        
Exemplo n.º 3
0
 public SafeTaskHandle ping2(
     string val, 
     pingCallback callback,
     int timeout_milliseconds = 0, 
     int reply_hash = 0,
     int request_hash = 0,
     RpcAddress server = null)
 {
     RpcWriteStream s = new RpcWriteStream(echoHelper.RPC_ECHO_ECHO_PING,timeout_milliseconds, request_hash);
     s.Write(val);
     s.Flush();
     
     return RpcCallAsync2(
                 server != null ? server : _server, 
                 s,
                 this, 
                 (err, rs) => 
                     { 
                         string resp;
                         rs.Read(out resp);
                         callback(err, resp);
                     },
                 reply_hash
                 );
 }       
Exemplo n.º 4
0
        public void ping(
            string val,
            pingCallback callback,
            int timeout_milliseconds = 0,
            int reply_thread_hash    = 0,
            int thread_hash          = 0,
            ulong partition_hash     = 0,
            RpcAddress server        = null)
        {
            var s = new RpcWriteStream(echoHelper.RPC_ECHO_ECHO_PING, timeout_milliseconds, thread_hash, partition_hash);

            s.Write(val);
            s.Flush();

            RpcCallAsync(
                server ?? _server,
                s,
                this,
                (err, rs) =>
            {
                string resp;
                rs.Read(out resp);
                callback(err, resp);
            },
                reply_thread_hash
                );
        }