2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
liblscp - LinuxSampler Control Protocol API |
liblscp - LinuxSampler Control Protocol API |
5 |
Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved. |
6 |
|
|
7 |
This library is free software; you can redistribute it and/or |
This library is free software; you can redistribute it and/or |
8 |
modify it under the terms of the GNU Lesser General Public |
modify it under the terms of the GNU Lesser General Public |
219 |
|
|
220 |
#ifdef DEBUG |
#ifdef DEBUG |
221 |
fprintf(stderr, "_lscp_connect_destroy: pConnect=%p.\n", pConnect); |
fprintf(stderr, "_lscp_connect_destroy: pConnect=%p.\n", pConnect); |
|
fprintf(stderr, "<%p> sock=%d addr=%s port=%d events=0x%04x ...\n", pConnect, |
|
|
pConnect->client.sock, |
|
|
inet_ntoa(pConnect->client.addr.sin_addr), |
|
|
ntohs(pConnect->client.addr.sin_port), |
|
|
(int) pConnect->events |
|
|
); |
|
222 |
#endif |
#endif |
223 |
|
|
224 |
lscp_socket_agent_free(&(pConnect->client)); |
lscp_socket_agent_free(&(pConnect->client)); |
225 |
|
|
|
#ifdef DEBUG |
|
|
fprintf(stderr, "<%p> Done.\n", pConnect); |
|
|
#endif |
|
|
|
|
226 |
free(pConnect); |
free(pConnect); |
227 |
|
|
228 |
return ret; |
return ret; |
260 |
{ |
{ |
261 |
lscp_socket_t sock; |
lscp_socket_t sock; |
262 |
struct sockaddr_in addr; |
struct sockaddr_in addr; |
263 |
int cAddr; |
socklen_t cAddr; |
264 |
lscp_connect_t *pConnect; |
lscp_connect_t *pConnect; |
265 |
|
|
266 |
#ifdef DEBUG |
#ifdef DEBUG |
298 |
|
|
299 |
lscp_socket_t sock; |
lscp_socket_t sock; |
300 |
struct sockaddr_in addr; |
struct sockaddr_in addr; |
301 |
int cAddr; |
socklen_t cAddr; |
302 |
lscp_connect_t *pConnect; |
lscp_connect_t *pConnect; |
303 |
|
|
304 |
#ifdef DEBUG |
#ifdef DEBUG |
596 |
/** |
/** |
597 |
* Send an event notification message to all subscribed clients. |
* Send an event notification message to all subscribed clients. |
598 |
* |
* |
599 |
* @param pServer Pointer to server instance structure. |
* @param pServer Pointer to server instance structure. |
600 |
* @param event Event type flag to send to all subscribed clients. |
* @param event Event type flag to send to all subscribed clients. |
601 |
* @param pchBuffer Pointer to event data to be sent to all clients. |
* @param pchData Pointer to event data to be sent to all clients. |
602 |
* @param cchBuffer Length of the event data to be sent in bytes. |
* @param cchData Length of the event data to be sent in bytes. |
603 |
* |
* |
604 |
* @returns LSCP_OK on success, LSCP_FAILED otherwise. |
* @returns LSCP_OK on success, LSCP_FAILED otherwise. |
605 |
*/ |
*/ |