BLib Reference Manual |
---|
bsocket —
enum BSocketOptions; gboolean b_socket_init (GError **error); gint b_socket_udp_new (BSocketOptions options, GError **error);
typedef enum { B_SO_NONE = 0, B_SO_BROADCAST = 1 << 0, B_SO_REUSEADDR = 1 << 1 } BSocketOptions;
B_SO_NONE | no options |
B_SO_BROADCAST | send and receive broadcast packages |
B_SO_REUSEADDR | allow the address and port to be reused |
gboolean b_socket_init (GError **error);
Initialize network sockets. This function does nothing on UNIXes. On Win32 it initializes the Winsock DLL. You may call this function any number of times, the initialization is only done once.
error : | return location for possible errors. |
Returns : | TRUE on success, FALSE in case of an error |
gint b_socket_udp_new (BSocketOptions options, GError **error);
Creates an UDP socket and configures it according to options.
options : | BSocketOptions to set on the socket. |
error : | return location for possible errors. |
Returns : | a socket descriptor or -1 in case of an error |
<< BSender | Blinkenlights Modules >> |