Lines Matching refs:fd
233 static int connack(FILE *dump, curl_socket_t fd) in connack() argument
243 rc = swrite(fd, (char *)packet, sizeof(packet)); in connack()
256 static int suback(FILE *dump, curl_socket_t fd, unsigned short packetid) in suback() argument
267 rc = swrite(fd, (char *)packet, sizeof(packet)); in suback()
279 static int puback(FILE *dump, curl_socket_t fd, unsigned short packetid) in puback() argument
289 rc = swrite(fd, (char *)packet, sizeof(packet)); in puback()
302 static int disconnect(FILE *dump, curl_socket_t fd) in disconnect() argument
307 ssize_t rc = swrite(fd, (char *)packet, sizeof(packet)); in disconnect()
389 curl_socket_t fd, unsigned short packetid, in publish() argument
436 rc = swrite(fd, (char *)packet, sendamount); in publish()
453 static int fixedheader(curl_socket_t fd, in fixedheader() argument
462 ssize_t rc = sread(fd, (char *)buffer, 2); in fixedheader()
476 rc = sread(fd, (char *)&buffer[i], 1); in fixedheader()
488 static curl_socket_t mqttit(curl_socket_t fd) in mqttit() argument
538 rc = fixedheader(fd, &byte, &remaining_length, &bytes); in mqttit()
553 rc = sread(fd, (char *)buffer, remaining_length); in mqttit()
611 if(connack(dump, fd)) { in mqttit()
649 if(suback(dump, fd, packet_id)) { in mqttit()
655 if(publish(dump, fd, packet_id, topic, data, datalen)) { in mqttit()
662 if(suback(dump, fd, packet_id)) { in mqttit()
670 publish(dump, fd, packet_id, topic, def, strlen(def)); in mqttit()
672 disconnect(dump, fd); in mqttit()
687 puback(dump, fd, 0); in mqttit()
691 rc = sread(fd, (char *)&buffer[0], 2); in mqttit()