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

import java.net.InetAddress;

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

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

    public final int status;
    public final InetAddress boundAddress;
    public final int boundPort;

    public CommandResponse(int status, InetAddress boundAddress, int boundPort) {
        this.status = status;

        assertNotNull(boundAddress);
        this.boundAddress = boundAddress;

        this.boundPort = boundPort;
    }

    @Override
    public String toString() {
        return "CommandResponse {"
               + "status=" + this.status
               + ", boundAddress=" + this.boundAddress
               + ", boundPort=" + this.boundPort
               + '}';
    }
}
