Skip to content

Authenticated Client

gcflames5 edited this page Aug 24, 2014 · 3 revisions

Creating an authenticated client is almost identical to creating a basic one. The only difference is that you must pass in an AuthenticationPacket to the constructor.

For information on creating an Authentication packet, see the Authenticated Server Wiki Page

String address = "127.0.0.1";
int port = 1337;
AuthenticatedTcpClientManager manager = new AuthenticatedTcpClientManager(address, port, new UserAuthenticationPacket("ExampleUsername", "ExamplePassword"));
try { manager.initialize(); }
catch (IOException e) { e.printStackTrace(); }

Clone this wiki locally