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, waitForNoResourcespublic SocketOptions.SocketDomain domain
public SocketOptions.SocketType type
public int connectTimeoutMs
public int keepAliveIntervalSecs
public int keepAliveTimeoutSecs
public long getNativeHandle()
CrtResourcegetNativeHandle in class CrtResourceprotected boolean canReleaseReferencesImmediately()
canReleaseReferencesImmediately in class CrtResourceprotected void releaseNativeHandle()
releaseNativeHandle in class CrtResourceCopyright © 2021. All rights reserved.