SilcNetCallback

SYNOPSIS

    typedef void (*SilcNetCallback)(SilcResult status,
                                    SilcStream stream, void *context);

DESCRIPTION

A callback of this type is returned by silc_net_tcp_create_listener and silc_net_tcp_connect functions. For silc_net_tcp_create_listener this callback means that new incoming connection was accepted, and the `stream' is the socket stream representing the socket connection.

For silc_net_tcp_connect this means that we have connected to the remote host and the `stream' is the socket stream for the socket connection. The SILC Stream API (such as silc_stream_read, etc.) can be used to read and write to the stream. The created stream is socket stream so various SilcSocketStream API functions can be used with the `stream'.