Two-way Protocol Implemented with Key Input

Made Protocol two-way, you can now interact with the client using keys,
which will be sent to the server application.
Note, there may still exist a race condition in the server during frame
generation, I have solved this issue using a rotating buffer in other
applications, it needs to be applied next.