/[svn]/liblscp/trunk/examples/server.c
ViewVC logotype

Diff of /liblscp/trunk/examples/server.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 146 by capela, Fri Jun 25 12:00:25 2004 UTC revision 869 by capela, Thu Jun 1 08:32:16 2006 UTC
# Line 2  Line 2 
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
# Line 219  static lscp_status_t _lscp_connect_destr Line 219  static lscp_status_t _lscp_connect_destr
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;
# Line 270  static void _lscp_server_thread_proc ( l Line 260  static void _lscp_server_thread_proc ( l
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
# Line 308  static void _lscp_server_select_proc ( l Line 298  static void _lscp_server_select_proc ( l
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
# Line 606  lscp_status_t lscp_server_destroy ( lscp Line 596  lscp_status_t lscp_server_destroy ( lscp
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   */   */

Legend:
Removed from v.146  
changed lines
  Added in v.869

  ViewVC Help
Powered by ViewVC