Clients.c
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2009, 2013 IBM Corp.
3  *
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v2.0
6  * and Eclipse Distribution License v1.0 which accompany this distribution.
7  *
8  * The Eclipse Public License is available at
9  * https://www.eclipse.org/legal/epl-2.0/
10  * and the Eclipse Distribution License is available at
11  * http://www.eclipse.org/org/documents/edl-v10.php.
12  *
13  * Contributors:
14  * Ian Craggs - initial API and implementation and/or initial documentation
15  * Ian Craggs - add SSL support
16  *******************************************************************************/
17 
24 #include "Clients.h"
25 
26 #include <string.h>
27 #include <stdio.h>
28 
29 
36 int clientIDCompare(void* a, void* b)
37 {
38  Clients* client = (Clients*)a;
39  /*printf("comparing clientdIDs %s with %s\n", client->clientID, (char*)b);*/
40  return strcmp(client->clientID, (char*)b) == 0;
41 }
42 
43 
50 int clientSocketCompare(void* a, void* b)
51 {
52  Clients* client = (Clients*)a;
53  /*printf("comparing %d with %d\n", (char*)a, (char*)b); */
54  return client->net.socket == *(int*)b;
55 }
int clientIDCompare(void *a, void *b)
Definition: Clients.c:36
networkHandles net
Definition: Clients.h:129
int clientSocketCompare(void *a, void *b)
Definition: Clients.c:50
MQTTAsync client
Definition: test6.c:276
char * clientID
Definition: Clients.h:119


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:47:33