Пример #1
0
 def generate_simple_response(self, request):
     # echo the request, except for bytes 4-7, where we put our timestamp
     return (buffer(request, 0, 4) +
             (buffer(_s_ulong.pack(ms_time(self.epoch_time()))) +
              buffer(request, 8)))
Пример #2
0
 def generate_simple_response(self, request):
     # echo the request, except for bytes 4-7, where we put our timestamp
     return (buffer(request, 0, 4) +
             (buffer(_s_ulong.pack(ms_time(self.epoch_time()))) +
              buffer(request, 8)))
Пример #3
0
 def generate_base_request(self):
     return (
         _s_ts_ver.pack(ms_time(self.epoch_time()), *self.compat_version) +
         generate_random_bytes(self.packet_bytes - 8))
Пример #4
0
 def generate_base_request(self):
     return (_s_ts_ver.pack(ms_time(self.epoch_time()),
                            *self.compat_version) +
             generate_random_bytes(self.packet_bytes - 8))