package com.jscape.inet.proxy.socks.protocol.v4.messages;

import java.net.Inet4Address;

import static com.jscape.util.Parameters.assertNotNull;

/**
 * @author Alex Usun
 */
public class CommandResponse
        extends Message {

    public final int result;
    public final int port;
    public final Inet4Address ip;

    public CommandResponse(int result, int port, Inet4Address ip) {
        this.result = result;
        this.port = port;

        assertNotNull(ip);
        this.ip = ip;
    }

    @Override
    public String toString() {
        return "CommandResponse {"
               + "result=" + this.result
               + ", port=" + this.port
               + ", ip=" + this.ip
               + '}';
    }
}
