Annotation of mqtt/src/client.c, revision 1.1.2.3
1.1.2.1 misho 1: #include "global.h"
2: #include "mqtt.h"
3:
4:
5: int
6: InitClient(void)
7: {
8: int sock;
9:
10: sock = socket(args->addr.sa.sa_family, SOCK_STREAM, IPPROTO_TCP);
11: if (sock == -1) {
12: printf("Error:: socket() #%d - %s\n", errno, strerror(errno));
13: return -1;
14: }
15: if (connect(sock, &args->addr.sa, args->addr.sa.sa_len) == -1) {
16: printf("Error:: connect() #%d - %s\n", errno, strerror(errno));
17: return -1;
18: }
19:
20: return sock;
21: }
1.1.2.2 misho 22:
23: int
24: SendConnect(int sock)
25: {
1.1.2.3 ! misho 26: return 0;
1.1.2.2 misho 27: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>