method Socket.prototype.emitSocket.prototype.emit(event: string | symbol,...args: any[],): booleanDeprecatedParametersevent: string | symbol<span>...args</span>: any[]Return TypebooleanSocket.prototype.emit(event: "close"): booleanDeprecatedParametersevent: "close"Return TypebooleanSocket.prototype.emit(event: "connect"): booleanDeprecatedParametersevent: "connect"Return TypebooleanSocket.prototype.emit(event: "error",err: Error,): booleanDeprecatedParametersevent: "error"err: ErrorReturn TypebooleanSocket.prototype.emit(event: "listening"): booleanDeprecatedParametersevent: "listening"Return TypebooleanSocket.prototype.emit(event: "message",msg: Buffer,rinfo: RemoteInfo,): booleanDeprecatedParametersevent: "message"msg: Bufferrinfo: RemoteInfoReturn Typeboolean