Package ch.bailu.gtk.gio
Class TcpConnection
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gio.IOStream
ch.bailu.gtk.gio.SocketConnection
ch.bailu.gtk.gio.TcpConnection
- All Implemented Interfaces:
PointerInterface
- Direct Known Subclasses:
TcpWrapperConnection
This is the subclass of #GSocketConnection that is created
for TCP/IP sockets.
for TCP/IP sockets.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gio.SocketConnection
SocketConnection.OnAsyncReadyCallback
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
boolean
Checks if graceful disconnects are used.static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
void
setGracefulDisconnect
(boolean graceful_disconnect) This enables graceful disconnects on close.Methods inherited from class ch.bailu.gtk.gio.SocketConnection
connect, connectAsync, connectFinish, factoryLookupType, factoryRegisterType, getLocalAddress, getRemoteAddress, getSocket, isConnected
Methods inherited from class ch.bailu.gtk.gio.IOStream
clearPending, close, closeAsync, closeFinish, getInputStream, getOutputStream, hasPending, isClosed, setPending, spliceAsync, spliceFinish
Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
TcpConnection
-
-
Method Details
-
getClassHandler
-
getGracefulDisconnect
public boolean getGracefulDisconnect()Checks if graceful disconnects are used. See
g_tcp_connection_set_graceful_disconnect().- Returns:
- %TRUE if graceful disconnect is used on close, %FALSE otherwise
-
setGracefulDisconnect
public void setGracefulDisconnect(boolean graceful_disconnect) This enables graceful disconnects on close. A graceful disconnect
means that we signal the receiving end that the connection is terminated
and wait for it to close the connection before closing the connection.
A graceful disconnect means that we can be sure that we successfully sent
all the outstanding data to the other end, or get an error reported.
However, it also means we have to wait for all the data to reach the
other side and for it to acknowledge this by closing the socket, which may
take a while. For this reason it is disabled by default.- Parameters:
graceful_disconnect
- Whether to do graceful disconnects or not
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-