public void messageReceived(final ChannelHandlerContext ctx, final SocksCmdRequest request) throws Exception {
CallbackNotifier cb = new CallbackNotifier() {
@Override
public void onSuccess(final ChannelHandlerContext outboundCtx) {
ctx.channel().write(new SocksCmdResponse(SocksCmdStatus.SUCCESS, request.addressType()))
.addListener(new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture channelFuture) throws Exception {
ctx.pipeline().remove(getName());
outboundCtx.channel().pipeline().addLast(new RelayHandler(ctx.channel()));
ctx.channel().pipeline().addLast(new RelayHandler(outboundCtx.channel()));