CLIENTCONNECTPROC callback

User defined client connection notification callback function.

void CALLBACK ClientConnectProc(
    HWMENCODE handle,
    BOOL connect,
    const char *ip
    void *user
);

Parameters

handleThe encoder handle.
connectThe client is connecting?
ipThe client's IP address... "xxx.xxx.xxx.xxx:port".
userThe user instance data given when BASS_WMA_EncodeSetNotify was called.

Remarks

A client connection notification can be used to keep track of who's connected, where they're from, and for long they've been connected.

Example

A callback function to log connections and disconnections.
void CALLBACK MyClientConnectProc(HWMENCODE handle, BOOL connect, const char *ip, void *user) {
    if (connect)
        printf("%s connected\n", ip);
    else
        printf("%s disconnected\n", ip);
}
...
BASS_WMA_EncodeSetNotify(handle, &MyClientConnectProc, 0); // set the notification callback

See also

BASS_WMA_EncodeSetNotify