Search in sources :

Example 11 with DecoderResult

use of io.netty.handler.codec.DecoderResult in project netty by netty.

the class DefaultSocks4CommandRequest method toString.

@Override
public String toString() {
    StringBuilder buf = new StringBuilder(128);
    buf.append(StringUtil.simpleClassName(this));
    DecoderResult decoderResult = decoderResult();
    if (!decoderResult.isSuccess()) {
        buf.append("(decoderResult: ");
        buf.append(decoderResult);
        buf.append(", type: ");
    } else {
        buf.append("(type: ");
    }
    buf.append(type());
    buf.append(", dstAddr: ");
    buf.append(dstAddr());
    buf.append(", dstPort: ");
    buf.append(dstPort());
    buf.append(", userId: ");
    buf.append(userId());
    buf.append(')');
    return buf.toString();
}
Also used : DecoderResult(io.netty.handler.codec.DecoderResult)

Example 12 with DecoderResult

use of io.netty.handler.codec.DecoderResult in project netty by netty.

the class DefaultSocks4CommandResponse method toString.

@Override
public String toString() {
    StringBuilder buf = new StringBuilder(96);
    buf.append(StringUtil.simpleClassName(this));
    DecoderResult decoderResult = decoderResult();
    if (!decoderResult.isSuccess()) {
        buf.append("(decoderResult: ");
        buf.append(decoderResult);
        buf.append(", dstAddr: ");
    } else {
        buf.append("(dstAddr: ");
    }
    buf.append(dstAddr());
    buf.append(", dstPort: ");
    buf.append(dstPort());
    buf.append(')');
    return buf.toString();
}
Also used : DecoderResult(io.netty.handler.codec.DecoderResult)

Example 13 with DecoderResult

use of io.netty.handler.codec.DecoderResult in project netty by netty.

the class DefaultSocks5CommandResponse method toString.

@Override
public String toString() {
    StringBuilder buf = new StringBuilder(128);
    buf.append(StringUtil.simpleClassName(this));
    DecoderResult decoderResult = decoderResult();
    if (!decoderResult.isSuccess()) {
        buf.append("(decoderResult: ");
        buf.append(decoderResult);
        buf.append(", status: ");
    } else {
        buf.append("(status: ");
    }
    buf.append(status());
    buf.append(", bndAddrType: ");
    buf.append(bndAddrType());
    buf.append(", bndAddr: ");
    buf.append(bndAddr());
    buf.append(", bndPort: ");
    buf.append(bndPort());
    buf.append(')');
    return buf.toString();
}
Also used : DecoderResult(io.netty.handler.codec.DecoderResult)

Example 14 with DecoderResult

use of io.netty.handler.codec.DecoderResult in project netty by netty.

the class DefaultSocks5InitialResponse method toString.

@Override
public String toString() {
    StringBuilder buf = new StringBuilder(StringUtil.simpleClassName(this));
    DecoderResult decoderResult = decoderResult();
    if (!decoderResult.isSuccess()) {
        buf.append("(decoderResult: ");
        buf.append(decoderResult);
        buf.append(", authMethod: ");
    } else {
        buf.append("(authMethod: ");
    }
    buf.append(authMethod());
    buf.append(')');
    return buf.toString();
}
Also used : DecoderResult(io.netty.handler.codec.DecoderResult)

Example 15 with DecoderResult

use of io.netty.handler.codec.DecoderResult in project netty by netty.

the class DefaultSocks5PasswordAuthRequest method toString.

@Override
public String toString() {
    StringBuilder buf = new StringBuilder(StringUtil.simpleClassName(this));
    DecoderResult decoderResult = decoderResult();
    if (!decoderResult.isSuccess()) {
        buf.append("(decoderResult: ");
        buf.append(decoderResult);
        buf.append(", username: ");
    } else {
        buf.append("(username: ");
    }
    buf.append(username());
    buf.append(", password: ****)");
    return buf.toString();
}
Also used : DecoderResult(io.netty.handler.codec.DecoderResult)

Aggregations

DecoderResult (io.netty.handler.codec.DecoderResult)18 Test (org.junit.Test)7 EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)5 Buffer (io.vertx.core.buffer.Buffer)2 WebSocketFrameInternal (io.vertx.core.http.impl.ws.WebSocketFrameInternal)2 TooLongFrameException (io.netty.handler.codec.TooLongFrameException)1 FullHttpRequest (io.netty.handler.codec.http.FullHttpRequest)1 HttpContent (io.netty.handler.codec.http.HttpContent)1 HttpObject (io.netty.handler.codec.http.HttpObject)1 HttpRequest (io.netty.handler.codec.http.HttpRequest)1 HttpResponse (io.netty.handler.codec.http.HttpResponse)1 HttpVersion (io.netty.handler.codec.http.HttpVersion)1 LastHttpContent (io.netty.handler.codec.http.LastHttpContent)1 WebSocketFrameImpl (io.vertx.core.http.impl.ws.WebSocketFrameImpl)1