public final class RealConnection extends FramedConnection.Listener implements Connection
| Modifier and Type | Field and Description |
|---|---|
int |
allocationLimit
|
List |
allocations
|
FramedConnection |
framedConnection
|
long |
idleAtNanos
|
boolean |
noNewStreams
|
okio |
sink
|
Socket |
socket
The application layer socket.
|
okio |
source
|
int |
successCount
|
REFUSE_INCOMING_STREAMS| Constructor and Description |
|---|
RealConnection(Route
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
|
void |
connect(int connectTimeout, int readTimeout, int writeTimeout, List
|
Handshake |
handshake()
Returns the TLS handshake used to establish this connection, or null if the connection is not HTTPS.
|
boolean |
isHealthy(boolean doExtensiveChecks)
Returns true if this connection is ready to host new streams.
|
boolean |
isMultiplexed()
Returns true if this is a SPDY connection.
|
void |
onSettings(FramedConnection
When settings are received, adjust the allocation limit.
|
void |
onStream(FramedStream
Refuse incoming streams.
|
Protocol |
protocol()
Returns the protocol negotiated by this connection, or
Protocol if no protocol has been negotiated.
|
Route |
route()
Returns the route used by this connection.
|
Socket |
socket()
Returns the socket that this connection is using.
|
String |
toString()
|
public Socketsocket
public volatile FramedConnectionframedConnection
public int successCount
public okio.BufferedSource source
public okio.BufferedSink sink
public int allocationLimit
public final List<Reference <StreamAllocation >> allocations
public boolean noNewStreams
public long idleAtNanos
public RealConnection(Routeroute)
public void connect(int connectTimeout,
int readTimeout,
int writeTimeout,
List<ConnectionSpec> connectionSpecs,
boolean connectionRetryEnabled)
throws RouteException
RouteException
public Routeroute()
Connection
public void cancel()
public Socketsocket()
Connection
public boolean isHealthy(boolean doExtensiveChecks)
public void onStream(FramedStreamstream) throws IOException
onStream in class
FramedConnection.Listener
IOException
public void onSettings(FramedConnectionconnection)
public Handshakehandshake()
Connection
public boolean isMultiplexed()
public Protocolprotocol()
Connection
Protocol.HTTP_1_1 if no protocol has been negotiated. This method returns
Protocol.HTTP_1_1 even if the remote peer is using
Protocol.HTTP_1_0 .
public StringtoString()