Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handshake(bytes: number[]) {
if (this.state) {
// validate client/server definitinos
const reflection = new Reflection();
reflection.decode(bytes);
} else {
// initialize reflected state from server
this.state = Reflection.decode(bytes) as any;
}
}
}