コード例 #1
0
        public override byte[] sender(IPEndPoint dest)
        {
            VivotekHeader header;

            byte[] result;

            header = new VivotekHeader()
            {
                session = sessionCounter++, magic = NetworkUtils.htonl(magic)
            };

            result = header.GetBytes();

            return(result);
        }
コード例 #2
0
        public override byte[] sender(IPEndPoint dest)
        {
            BoschRequest request;

            byte[]   result;
            DateTime date;

            date = DateTime.UtcNow;

            request               = new BoschRequest();
            request.magic         = NetworkUtils.htonl(magic);
            request.transactionID = NetworkUtils.htonl((UInt32)
                                                       ((date.Hour << 24) | (date.Minute << 16) |
                                                        (date.Second << 8) | (date.Millisecond / 10)
                                                       ));
            request.requestMagic = NetworkUtils.htonl(requestMagic);

            result = request.GetBytes();

            return(result);
        }