修改後的問題:有人可以更好地解釋解碼器/編碼器?
好吧,所以我試圖將其納入我自己定製的遊戲中。我瞭解Netty服務器和客戶端如何連接的過程。我也理解解碼器和編碼器在理論上是如何工作的。但這仍然是我想要了解的。
我的服務器進程:
Server boots up -> Client starts
Client requests connection -> Server accepts
Server instructs client connection is good -> Client continues to the login screen
(Ignoring any type of security protocol)
Client sends username and password over Channel
Server gets username and password checks it in the database or file
Server pushes -> yes or no
if yes Server sends player stats
if no Server creates new player
這個過程,我知道我需要有一個全球處理器使每個人都看到近乎實時更新之後。現在我不知道如何實現這個東西的解碼器。
我真的很想看到一些例子,說明它們是如何實現的。 與最好的一些說明.... 注:我不是說爲我解決這個問題,但告訴我如何處理不同的信息。最佳實踐和標準,請....
我想補充一點,我正在引用Netty API以及它如何使用解碼器和編碼器......我感覺好像該指南並沒有詳細介紹實現您自己的解碼器以及如何實現。我還想重申一下,就像我最後一次說的那樣。我一直在我的頭上這一段時間,我似乎無法把握這... – Maxs728