libfluidsynth  2.3.5
Command Server

TCP socket server for a command handler. More...

Lifecycle Functions for Command Server_linebr@{

fluid_server_tnew_fluid_server (fluid_settings_t *settings, fluid_synth_t *synth, fluid_midi_router_t *router)
 Create a new TCP/IP command shell server. More...
 
fluid_server_tnew_fluid_server2 (fluid_settings_t *settings, fluid_synth_t *synth, fluid_midi_router_t *router, fluid_player_t *player)
 Create a new TCP/IP command shell server. More...
 
void delete_fluid_server (fluid_server_t *server)
 Delete a TCP/IP shell server. More...
 
int fluid_server_join (fluid_server_t *server)
 Join a shell server thread (wait until it quits). More...
 

Detailed Description

TCP socket server for a command handler.

The socket server will open the TCP port set by shell.port (default 9800) and starts a new thread and Command Handler for each incoming connection.

Note
The server is only available if libfluidsynth has been compiled with network support (enable-network). Without network support, all related functions will return FLUID_FAILED or NULL.

Function Documentation

◆ delete_fluid_server()

void delete_fluid_server ( fluid_server_t server)

Delete a TCP/IP shell server.

Parameters
serverShell server instance

◆ fluid_server_join()

int fluid_server_join ( fluid_server_t server)

Join a shell server thread (wait until it quits).

Parameters
serverShell server instance
Returns
FLUID_OK on success, FLUID_FAILED otherwise

◆ new_fluid_server()

fluid_server_t* new_fluid_server ( fluid_settings_t settings,
fluid_synth_t synth,
fluid_midi_router_t router 
)

Create a new TCP/IP command shell server.

See new_fluid_server2() for more information.

◆ new_fluid_server2()

fluid_server_t* new_fluid_server2 ( fluid_settings_t settings,
fluid_synth_t synth,
fluid_midi_router_t router,
fluid_player_t player 
)

Create a new TCP/IP command shell server.

Parameters
settingsSettings instance to use for the shell
synthIf not NULL, the synth instance for the command handler to be used by the client
routerIf not NULL, the midi_router instance for the command handler to be used by the client
playerIf not NULL, the player instance for the command handler to be used by the client
Returns
New shell server instance or NULL on error