All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rx.socks.tcp.SessionClient Maven / Gradle / Ivy

package org.rx.socks.tcp;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelId;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;

import java.net.InetSocketAddress;

@RequiredArgsConstructor
public class SessionClient {
    protected final ChannelHandlerContext ctx;
    @Getter
    @Setter
    private String groupId;
    @Getter
    private final T state;

    public ChannelId getId() {
        return ctx.channel().id();
    }

    public InetSocketAddress getRemoteAddress() {
        return (InetSocketAddress) ctx.channel().remoteAddress();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy