import { GameServerToClient } from "@creature-chess/networking" ; import { Socket } from "socket.io" ; export const failHandshake = ( socket , response ) => { socket . emit ( "authenticate_response" , response ) ; socket . removeAllListeners ( ) ; socket . disconnect ( ) ; } ; export const successHandshake = ( socket ) => { socket . removeAllListeners ( "authenticate" ) ; socket . emit ( "authenticate_response" , { error : null } ) ; } ;