litestomp
|
#include "stomp_messenger.h"
stomp_status_code_t stomp_abort | ( | stomp_messenger_t * | messenger, |
stomp_transaction_header_t * | header | ||
) |
Aborts a transaction
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
stomp_status_code_t stomp_ack | ( | stomp_messenger_t * | messenger, |
stomp_ack_header_t * | header | ||
) |
Acknowledges the processing of a message
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
stomp_status_code_t stomp_begin | ( | stomp_messenger_t * | messenger, |
stomp_transaction_header_t * | header | ||
) |
Begin a transaction
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
stomp_status_code_t stomp_commit | ( | stomp_messenger_t * | messenger, |
stomp_transaction_header_t * | header | ||
) |
Commits a transaction
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
stomp_status_code_t stomp_connect | ( | stomp_messenger_t * | messenger, |
stomp_connection_header_t * | header, | ||
int32_t | timeout | ||
) |
Connects to the endpoint associated with the messenger
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
timeout | the timeout in milliseconds |
stomp_status_code_t stomp_disconnect | ( | stomp_messenger_t * | messenger, |
stomp_disconnection_header_t * | header | ||
) |
Disconnects from the endpoint associated with the messenger
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
void stomp_messenger_destroy | ( | stomp_messenger_t ** | messenger | ) |
Destroys the messenger object. The object will be unusable after destruction
messenger | An instance of the messenger object |
stomp_messenger_t* stomp_messenger_init | ( | ) |
Copyright 2016 Otavio Rodolfo Piske
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
void stomp_messenger_set_timeout | ( | stomp_messenger_t * | messenger, |
int32_t | timeout | ||
) |
Sets the timeout for messenger communication. The value set also applies to receipt messages
timeout | the timeout in milliseconds |
stomp_status_code_t stomp_nack | ( | stomp_messenger_t * | messenger, |
stomp_ack_header_t * | header | ||
) |
Not-acknowledges the processing of a message
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
stomp_status_code_t stomp_receive | ( | stomp_messenger_t * | messenger, |
stomp_receive_header_t * | header, | ||
stomp_message_t * | message | ||
) |
Reads the exchange data from the broker. The returned exchange may be a message or an error.
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
message | the message to exchange |
stomp_status_code_t stomp_send | ( | stomp_messenger_t * | messenger, |
stomp_send_header_t * | header, | ||
stomp_message_t * | message | ||
) |
Sends a message
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
message | the message to exchange |
stomp_status_code_t stomp_set_endpoint | ( | stomp_messenger_t * | messenger, |
const char * | uri | ||
) |
Sets the communication endpoint for the message exchange.
messenger | An instance of the messenger object |
uri | A connection uri in the stomp://[user]:[password]<hostname>:<port>/<endpoint address>=""> |
stomp_status_code_t stomp_subscribe | ( | stomp_messenger_t * | messenger, |
stomp_subscription_header_t * | header | ||
) |
Subscribes to the endpoint associated with the messenger
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |
stomp_status_code_t stomp_unsubscribe | ( | stomp_messenger_t * | messenger, |
stomp_subscription_header_t * | header | ||
) |
Unsubscribes from the endpoint associated with the messenger
messenger | A pointer to an instance of the messenger object |
header | A pointer to an instance of the appropriate header object for the given exchange. The instance of the object must contain the required frame headers as expected by the frame. |