"""
This type stub file was generated by pyright.
"""

from nats.errors import ProtocolError

"""
NATS network protocol parser.
"""
MSG_RE = ...
HMSG_RE = ...
OK_RE = ...
ERR_RE = ...
PING_RE = ...
PONG_RE = ...
INFO_RE = ...
INFO_OP = ...
CONNECT_OP = ...
PUB_OP = ...
MSG_OP = ...
HMSG_OP = ...
SUB_OP = ...
UNSUB_OP = ...
PING_OP = ...
PONG_OP = ...
OK_OP = ...
ERR_OP = ...
MSG_END = ...
_CRLF_ = ...
_SPC_ = ...
OK = ...
PING = ...
PONG = ...
CRLF_SIZE = ...
OK_SIZE = ...
PING_SIZE = ...
PONG_SIZE = ...
MSG_OP_SIZE = ...
ERR_OP_SIZE = ...
AWAITING_CONTROL_LINE = ...
AWAITING_MSG_PAYLOAD = ...
MAX_CONTROL_LINE_SIZE = ...
STALE_CONNECTION = ...
AUTHORIZATION_VIOLATION = ...
PERMISSIONS_ERR = ...
class Parser:
    def __init__(self, nc=...) -> None:
        ...
    
    def __repr__(self) -> str:
        ...
    
    def reset(self) -> None:
        ...
    
    async def parse(self, data: bytes = ...): # -> None:
        """
        Parses the wire protocol from NATS for the client
        and dispatches the subscription callbacks.
        """
        ...
    


class ErrProtocol(ProtocolError):
    """
    .. deprecated:: v2.0.0
    """
    def __str__(self) -> str:
        ...
    


