Network Interface

DESCRIPTION

SILC Net API provides various network routines for applications. It can be used to create TCP/IP and UDP/IP connections and listeners. Various utility functions for resolving various information is also provided. The interface supports both IPv4 and IPv6.

EXAMPLE

 // Create TCP connection to example.com at port 25
 silc_net_tcp_connect(NULL, "example.com", 25, schedule, connected_cb, ctx);

 // Create UDP listener on local interface 10.2.1.7 on port 500
 SilcStream udpstream;

 udpstream = silc_net_udp_connect("10.2.1.7", 500, NULL, 0, schedule);
 silc_stream_set_notifier(udpstream, schedule, receive_callback, ctx);

TABLE OF CONTENTS