How to shutdown server safely

17 views
Skip to first unread message

xQuasar

unread,
Oct 4, 2009, 6:50:55 AM10/4/09
to kryonet-users
So how do I shutdown the server safely?

Will just Server.close() do, or should I close all the connections
with the clients first?

Cheers,
xQuasar

Nate

unread,
Oct 4, 2009, 5:20:10 PM10/4/09
to kryonet-users
From Server#close() javadocs: Closes all open connections and the
server ports.

If you close a server you can reopen it by calling bind. If you close
a client you can reopen it by calling connect.

If you are running a server or client by calling start, you can call
stop to both close it and stop its update thread. For a client, if you
call stop you will have to call start again before you can reopen it
using connect.

-Nate
Reply all
Reply to author
Forward
0 new messages