27 lines
607 B
Python
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()
|