Progress towards a server connection pipeline.

This commit is contained in:
Andrew Steinborn
2018-07-24 17:58:20 -04:00
parent 0515a5d86f
commit 9e397b10b5
14 changed files with 243 additions and 35 deletions

View File

@@ -66,10 +66,12 @@ public class InboundMinecraftConnection {
this.setStatus(StateRegistry.STATUS);
this.sessionHandler = new StatusSessionHandler(this);
break;
default:
case 2:
this.setStatus(StateRegistry.LOGIN);
this.sessionHandler = new LoginSessionHandler(this);
break;
default:
throw new IllegalArgumentException("Invalid state " + handshake.getNextStatus());
}
}
@@ -83,4 +85,8 @@ public class InboundMinecraftConnection {
channel.pipeline().get(MinecraftEncoder.class).setState(state);
channel.pipeline().get(MinecraftDecoder.class).setState(state);
}
public void teardown() {
closed = true;
}
}