Remove dead code

... to fix "E265 block comment should start with '# '".
This commit is contained in:
Takashi Kajinami 2025-06-08 22:54:26 +09:00
parent 992a2d1793
commit 053d37c1d6
3 changed files with 0 additions and 7 deletions

View File

@ -76,11 +76,7 @@ class WebSocketLoad(WebSockifyRequestHandler):
def generate(self): def generate(self):
length = random.randint(10, self.max_packet_size) length = random.randint(10, self.max_packet_size)
numlist = self.rand_array[self.max_packet_size - length:] numlist = self.rand_array[self.max_packet_size - length:]
# Error in length
#numlist.append(5)
chksum = sum(numlist) chksum = sum(numlist)
# Error in checksum
#numlist[0] = 5
nums = "".join([str(n) for n in numlist]) nums = "".join([str(n) for n in numlist])
data = "^%d:%d:%d:%s$" % (self.send_cnt, length, chksum, nums) data = "^%d:%d:%d:%s$" % (self.send_cnt, length, chksum, nums)
self.send_cnt += 1 self.send_cnt += 1

View File

@ -766,7 +766,6 @@ class WebSocket:
dtype = dtype.newbyteorder('>') dtype = dtype.newbyteorder('>')
mask = numpy.frombuffer(mask, dtype, count=1) mask = numpy.frombuffer(mask, dtype, count=1)
data = numpy.frombuffer(buf, dtype, count=int(plen / 4)) data = numpy.frombuffer(buf, dtype, count=int(plen / 4))
#b = numpy.bitwise_xor(data, mask).data
b = numpy.bitwise_xor(data, mask).tobytes() b = numpy.bitwise_xor(data, mask).tobytes()
if plen % 4: if plen % 4:

View File

@ -578,7 +578,6 @@ class WebSockifyServer():
# Peek, but do not read the data so that we have a opportunity # Peek, but do not read the data so that we have a opportunity
# to SSL wrap the socket first # to SSL wrap the socket first
handshake = sock.recv(1024, socket.MSG_PEEK) handshake = sock.recv(1024, socket.MSG_PEEK)
#self.msg("Handshake [%s]" % handshake)
if not handshake: if not handshake:
raise self.EClose("") raise self.EClose("")
@ -660,7 +659,6 @@ class WebSockifyServer():
def poll(self): def poll(self):
""" Run periodically while waiting for connections. """ """ Run periodically while waiting for connections. """
#self.vmsg("Running poll()")
pass pass
def terminate(self): def terminate(self):