简体   繁体   English

Java代理服务器在切换服务器时使客户端连接保持活动状态

[英]Java proxy server keep client connection alive while switching servers

I am trying to create a proxy server for minecraft that would allow the user to switch servers without relogging. 我试图为我的世界创建一个代理服务器,允许用户切换服务器而无需重新登录。 What i would need to be able to do is to create a server that handles the incoming connections from the client and forward them to the appropriate server, which i have done. 我需要做的是创建一个服务器来处理来自客户端的传入连接,并将它们转发到适当的服务器,这已经完成了。 My question is how do you change connection to the server while still keeping the client connection alive so it dosent disconnect. 我的问题是如何在保持客户端连接保持活动状态的同时更改与服务器的连接,以免断开连接。

you will need to send the player a 0x09 (respawn) packet to the client to reload the world and send the server some packets (0x02,0x01) to log the client in and falsify 0x0a (player update) and 0x00 (keep alive) packets to be sent to the backrounded servers 您将需要向玩家发送一个0x09(重生)数据包以重新加载世界,并向服务器发送一些数据包(0x02、0x01)以登录客户端并伪造0x0a(玩家更新)和0x00(保持活动)数据包发送到后台服务器

see: http://wiki.vg for more info 有关更多信息,请参见: http ://wiki.vg

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM