xenu_nntp/lib/nntp/tiny/request.py

14 lines
277 B
Python
Raw Normal View History

2024-11-20 21:17:03 -05:00
import socket
2024-11-20 21:17:38 -05:00
class Request():
2024-11-20 21:17:03 -05:00
__slots__ = 'buf', 'offset', 'sock',
BUFFER_SIZE = 4096
def __init__(self, sock: socket.socket):
self.buf: bytearray = bytearray(self.BUFFER_SIZE)
self.offset: int = 0
self.sock: socket.socket = sock