RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.net.HAProxyMessageHandler Class Reference
Inheritance diagram for com.runehive.net.HAProxyMessageHandler:
Collaboration diagram for com.runehive.net.HAProxyMessageHandler:

Protected Member Functions

void channelRead0 (final ChannelHandlerContext ctx, final HAProxyMessage msg)

Detailed Description

Author
Jire

Definition at line 11 of file HAProxyMessageHandler.java.

Member Function Documentation

◆ channelRead0()

void com.runehive.net.HAProxyMessageHandler.channelRead0 ( final ChannelHandlerContext ctx,
final HAProxyMessage msg )
protected

Definition at line 14 of file HAProxyMessageHandler.java.

15 {
16 switch (msg.command()) {
17 case LOCAL -> ctx.close();
18 case PROXY -> {
19 final String sourceAddress = msg.sourceAddress();
20 if (sourceAddress != null) {
21 ctx.channel().attr(Config.SOURCE_ADDRESS).set(sourceAddress);
22 }
23 }
24 }
25 }

References com.runehive.Config.SOURCE_ADDRESS.


The documentation for this class was generated from the following file: