onDataReady() {
	        switch (this.state) {
	            case RPCServerState.InitHeader: {
	                this.handleInitHeader();
	                break;
	            }
	            case RPCServerState.InitHeaderKey: {
	                this.handleInitHeaderKey();
	                break;
	            }
	            case RPCServerState.ReceivePacketHeader: {
	                this.currPacketHeader = this.readFromBuffer(8 /* I64 */);
	                const reader = new ByteStreamReader(this.currPacketHeader);
	                this.currPacketLength = reader.readU64();
	                support.assert(this.pendingBytes == 0);
	                this.requestBytes(this.currPacketLength);
	                this.state = RPCServerState.ReceivePacketBody;
	                break;
	            }
	            case RPCServerState.ReceivePacketBody: {
	                const body = this.readFromBuffer(this.currPacketLength);
	                support.assert(this.pendingBytes == 0);
	                support.assert(this.currPacketHeader !== undefined);
	                this.onPacketReady(this.currPacketHeader, body);
	                break;
	            }
	            case RPCServerState.WaitForCallback: {
	                support.assert(this.pendingBytes == 0);
	                break;
	            }
	            default: {
	                throw new Error("Cannot handle state " + this.state);
	            }
	        }
	    }
State machine to handle each request