File: //lib/python3/dist-packages/twisted/conch/ssh/__pycache__/service.cpython-38.pyc
U
W[� � @ s6 d Z ddlmZmZ ddlmZ G dd� dej�ZdS )z�
The parent class for all the SSH services. Currently implemented services
are ssh-userauth and ssh-connection.
Maintainer: Paul Swartz
� )�division�absolute_import)�logc @ s8 e Zd ZdZi ZdZdd� Zdd� Zdd� Zdd � Z dS )
�
SSHServiceNc C s dS )zE
called when the service is active on the transport.
N� ��selfr r �;/usr/lib/python3/dist-packages/twisted/conch/ssh/service.py�serviceStarted s zSSHService.serviceStartedc C s dS )z�
called when the service is stopped, either by the connection ending
or by another service being started
Nr r r r r �serviceStopped s zSSHService.serviceStoppedc C s d| j | jj�� f S )NzSSHService %r on %s)�name� transport� logPrefixr r r r r s
�zSSHService.logPrefixc C sf || j kr<| j | }t| d|dd� d�}|dk r<||�S t�d| � t�t|�� | j�� dS )zB
called when we receive a packet on the transport
zssh_%s� Nzcouldn't handle %r)�protocolMessages�getattrr �msg�reprr
ZsendUnimplemented)r Z
messageNumZpacketZmessageType�fr r r �packetReceived# s
�zSSHService.packetReceived)
�__name__�
__module__�__qualname__r r r
r
r r r r r r r r s r N)�__doc__Z
__future__r r Ztwisted.pythonr ZLoggerr r r r r �<module> s