io.nadron.client.util.SimpleCredentials Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nadclient Show documentation
Show all versions of nadclient Show documentation
This is a client library for Nadron server https://github.com/menacher/java-game-server/tree/netty4/nadron. Java clients can use this program to connect and interact with nadron server.
package io.nadron.client.util;
import io.netty.buffer.ByteBuf;
public class SimpleCredentials implements Credentials
{
private final String username;
private final String password;
public SimpleCredentials(ByteBuf buffer)
{
this.username = NettyUtils.readString(buffer);
this.password = NettyUtils.readString(buffer);
}
@Override
public String getUsername()
{
return username;
}
@Override
public String getPassword()
{
return password;
}
@Override
public String toString()
{
return username;
}
}