This repository has been archived on 2023-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
ACMS/src/Server/errorHandler.py

27 lines
607 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Connection error handler for the server.
"""
from colorama import Fore
__author__ = "CaumartinYann"
__copyright__ = "Copyright 2017, ACMS"
__license__ = "GPLv3"
__status__ = "Production"
__date__ = "03/30/2017"
def serverSendErrHandler(connection):
print(Fore.RED + "An error occurred on the connection with a client, let\'s close its socket." + Fore.RESET)
connection.close()
def serverRecvErrHandler(connection):
print(Fore.RED + "An error occurred on the connection with a client, let\'s close its socket." + Fore.RESET)
connection.close()