Browsing Italian translation

7180 of 86 results
71.
mosquitto_loop_read
(no translation yet)
Located in libmosquitto.3.xml:195(function)
72.
mosquitto_loop_write
(no translation yet)
Located in libmosquitto.3.xml:199(function)
73.
mosquitto_loop_misc
(no translation yet)
Located in libmosquitto.3.xml:203(function)
74.
mosquitto_socket
(no translation yet)
Located in libmosquitto.3.xml:207(function)
75.
Callbacks
(no translation yet)
Located in libmosquitto.3.xml:214(title)
76.
See mosquitto.h
(no translation yet)
Located in libmosquitto.3.xml:215(para)
77.
Examples
(no translation yet)
Located in libmosquitto.3.xml:250(title)
78.

#include <mosquitto.h>

void my_message_callback(void *obj, struct mosquitto_message *message)
{
[tab]if(message->payloadlen){
[tab][tab]printf("%s %s\n", message->topic, message->payload);
[tab]}else{
[tab][tab]printf("%s (null)\n", message->topic);
[tab]}
[tab]fflush(stdout);
}

void my_connect_callback(void *obj, int result)
{
[tab]struct mosquitto *mosq = obj;

[tab]int i;
[tab]if(!result){
[tab][tab]mosquitto_subscribe(mosq, topics[i], topic_qos);
[tab]}else{
[tab][tab]fprintf(stderr, "Connect failed\n");
[tab]}
}

void my_subscribe_callback(void *obj, uint16_t mid, int qos_count, const uint8_t *granted_qos)
{
[tab]int i;

[tab]printf("Subscribed (mid: %d): %d", mid, granted_qos[0]);
[tab]for(i=1; i<qos_count; i++){
[tab][tab]printf(", %d", granted_qos[i]);
[tab]}
[tab]printf("\n");
}

int main(int argc, char *argv[])
{
[tab]char id[30];
[tab]int i;
[tab]char *host = "localhost";
[tab]int port = 1883;
[tab]int keepalive = 60;
[tab]bool clean_session = true;
[tab]struct mosquitto *mosq = NULL;

[tab]mosq = mosquitto_new(id, NULL);
[tab]if(!mosq){
[tab][tab]fprintf(stderr, "Error: Out of memory.\n");
[tab][tab]return 1;
[tab]}
[tab]mosquitto_log_init(mosq, MOSQ_LOG_DEBUG | MOSQ_LOG_ERR | MOSQ_LOG_WARNING
[tab][tab][tab]| MOSQ_LOG_NOTICE | MOSQ_LOG_INFO, MOSQ_LOG_STDERR);

[tab]mosquitto_connect_callback_set(mosq, my_connect_callback);
[tab]mosquitto_message_callback_set(mosq, my_message_callback);
[tab]mosquitto_subscribe_callback_set(mosq, my_subscribe_callback);

[tab]if(mosquitto_connect(mosq, host, port, keepalive, clean_session)){
[tab][tab]fprintf(stderr, "Unable to connect.\n");
[tab][tab]return 1;
[tab]}

[tab]while(!mosquitto_loop(mosq, -1)){
[tab]}
[tab]mosquitto_destroy(mosq);
[tab]return 0;
}
[tab][tab]
[tab] represents a tab character. Please write it exactly the same way, [tab], in your translation.
There are line breaks here. Each one represents a line break. Start a new line in the equivalent position in the translation.
(no translation yet)
Located in libmosquitto.3.xml:251(programlisting)
79.
See Also
(no translation yet)
Located in libmosquitto.3.xml:322(title)
80.
mosquitto
(no translation yet)
Located in libmosquitto.3.xml:325(refentrytitle)
7180 of 86 results

No translation group has been assigned.

You are not logged in. Please log in to work on translations.

No-one has contributed to this translation yet.