com.gateway.connector.tcp.client.ReadProtoProcess Maven / Gradle / Ivy
package com.gateway.connector.tcp.client;
import com.gateway.connector.proto.Cmd;
import com.gateway.connector.proto.Proto;
import com.gateway.connector.utils.AsyncBase;
public class ReadProtoProcess extends AsyncBase {
public IClientListener listener;
public ReadProtoProcess() {
super(true, Integer.MAX_VALUE);
}
@Override
protected void process(Proto msg) {
if (msg.getCmd() == Cmd.CONNECT) {
if (listener != null) {
listener.onLoginResult(msg);
}
}
if (listener != null) {
listener.onMessage(msg);
}
}
}