1.88 <GTcpConnection>

Class: <GTcpConnection>

It derives from <GSocketConnection>.

This is the subclass of <GSocketConnection> that is created for TCP/IP sockets.

Fields

parent-instance
priv

Properties

Property: tcp-connection:graceful-disconnect self

Whether iostream:close? does a graceful disconnect.

Its value is a boolean.

Set it with (set! (tcp-connection:graceful-disconnect self) value).

Procedures

Method: tcp-connection:get-graceful-disconnect? self ⇒ %return
Method: get-graceful-disconnect? self ⇒ %return

Checks if graceful disconnects are used. See tcp-connection:set-graceful-disconnect.

self

Passed: a <GTcpConnection>.

a <GTcpConnection>

%return

Returned: a boolean.

#t if graceful disconnect is used on close, #f otherwise

Method: tcp-connection:set-graceful-disconnect self graceful-disconnect
Method: set-graceful-disconnect self 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.

self

Passed: a <GTcpConnection>.

a <GTcpConnection>

graceful-disconnect

Passed: a boolean.

Whether to do graceful disconnects or not