package io.grpc.okhttp;

import com.google.common.base.Preconditions;
import io.grpc.Attributes;
import io.grpc.InternalChannelz;
import java.io.IOException;
import java.net.Socket;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes6.dex */
public interface HandshakerSocketFactory {
    HandshakeResult handshake(Socket socket, Attributes attributes) throws IOException;

    /* loaded from: classes6.dex */
    public static final class HandshakeResult {
        public final Attributes attributes;
        public final InternalChannelz.Security securityInfo;
        public final Socket socket;

        public HandshakeResult(Socket socket, Attributes attributes, InternalChannelz.Security security) {
            this.socket = (Socket) Preconditions.checkNotNull(socket, "socket");
            this.attributes = (Attributes) Preconditions.checkNotNull(attributes, "attributes");
            this.securityInfo = security;
        }
    }
}
