public final class SocketOptions extends CrtResource
Modifier and Type | Class and Description |
---|---|
static class |
SocketOptions.SocketDomain
Socket communications domain
|
static class |
SocketOptions.SocketType
Socket type
|
CrtResource.ResourceInstance
Modifier and Type | Field and Description |
---|---|
int |
connectTimeoutMs
Sets the number of milliseconds before a connection will be considered timed out
|
SocketOptions.SocketDomain |
domain
Sets the socket domain
|
int |
keepAliveIntervalSecs
Sets the number of seconds between TCP keepalive packets being sent to the peer
0 disables keepalive
|
int |
keepAliveTimeoutSecs
Sets the number of seconds to wait for a keepalive response before considering the connection timed out
0 disables keepalive
|
SocketOptions.SocketType |
type
Sets the socket type
|
Constructor and Description |
---|
SocketOptions()
Creates a new set of socket options
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canReleaseReferencesImmediately()
Determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.
|
long |
getNativeHandle()
returns the native handle associated with this CRTResource.
|
protected void |
releaseNativeHandle()
Frees the native resources for this set of socket options
|
acquireNativeHandle, addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getResourceLogDescription, isNull, logNativeResources, releaseReferences, removeReferenceTo, setDescription, swapReferenceTo, waitForNoResources
public SocketOptions.SocketDomain domain
public SocketOptions.SocketType type
public int connectTimeoutMs
public int keepAliveIntervalSecs
public int keepAliveTimeoutSecs
public long getNativeHandle()
CrtResource
getNativeHandle
in class CrtResource
protected boolean canReleaseReferencesImmediately()
canReleaseReferencesImmediately
in class CrtResource
protected void releaseNativeHandle()
releaseNativeHandle
in class CrtResource
Copyright © 2021. All rights reserved.