상속: Plasma.plNetStruct
예제 #1
0
        public void Ping(uint ms, byte[] payload = null, pnCallback cb = null)
        {
            pnCli2Auth_PingRequest req = new pnCli2Auth_PingRequest();
            req.fPayload = payload;
            req.fPingTimeMs = ms;
            req.fTransID = GetTransID();

            lock (fStream) {
                if (cb != null)
                    fCallbacks.Add(req.fTransID, cb);
                req.Send(fStream);
            }
        }
예제 #2
0
        private void IPingPong()
        {
            pnCli2Auth_PingRequest req = new pnCli2Auth_PingRequest();
            req.Read(fStream);

            pnAuth2Cli_PingReply reply = new pnAuth2Cli_PingReply();
            reply.fPayload = req.fPayload;
            reply.fPingTimeMs = req.fPingTimeMs;
            reply.fTransID = req.fTransID;
            reply.Send(fStream);
        }