|
Revision 7afb4e334fa8390d0543fc8d916d5c6b861511a9, 1.5 kB
(checked in by Theo Schlossnagle <jesus@omniti.com>, 4 years ago)
|
fixes #219
This is "significant" as it requires adding a module section to
stratcon.conf and not using the <stomp> stanza, but instead using
<mq type="stomp">. I've tested it with ActiveMQ and RabbitMQ and
both work fine.
|
- Property mode set to
100644
|
| Line | |
|---|
| 1 |
/** |
|---|
| 2 |
* |
|---|
| 3 |
* Copyright 2005 LogicBlaze Inc. |
|---|
| 4 |
* |
|---|
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|---|
| 6 |
* you may not use this file except in compliance with the License. |
|---|
| 7 |
* You may obtain a copy of the License at |
|---|
| 8 |
* |
|---|
| 9 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 10 |
* |
|---|
| 11 |
* Unless required by applicable law or agreed to in writing, software |
|---|
| 12 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|---|
| 13 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|---|
| 14 |
* See the License for the specific language governing permissions and |
|---|
| 15 |
* limitations under the License. |
|---|
| 16 |
*/ |
|---|
| 17 |
#ifndef STOMP_H |
|---|
| 18 |
#define STOMP_H |
|---|
| 19 |
|
|---|
| 20 |
#include "apr_general.h" |
|---|
| 21 |
#include "apr_network_io.h" |
|---|
| 22 |
#include "apr_hash.h" |
|---|
| 23 |
|
|---|
| 24 |
#ifdef __cplusplus |
|---|
| 25 |
extern "C" { |
|---|
| 26 |
#endif /* __cplusplus */ |
|---|
| 27 |
|
|---|
| 28 |
typedef struct stomp_connection { |
|---|
| 29 |
apr_socket_t *socket; |
|---|
| 30 |
apr_sockaddr_t *local_sa; |
|---|
| 31 |
char *local_ip; |
|---|
| 32 |
apr_sockaddr_t *remote_sa; |
|---|
| 33 |
char *remote_ip; |
|---|
| 34 |
} stomp_connection; |
|---|
| 35 |
|
|---|
| 36 |
typedef struct stomp_frame { |
|---|
| 37 |
char *command; |
|---|
| 38 |
apr_hash_t *headers; |
|---|
| 39 |
char *body; |
|---|
| 40 |
int body_length; |
|---|
| 41 |
} stomp_frame; |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
APR_DECLARE(apr_status_t) stomp_connect(stomp_connection **connection_ref, const char *hostname, int port, apr_pool_t *pool); |
|---|
| 46 |
APR_DECLARE(apr_status_t) stomp_disconnect(stomp_connection **connection_ref); |
|---|
| 47 |
|
|---|
| 48 |
APR_DECLARE(apr_status_t) stomp_write(stomp_connection *connection, stomp_frame *frame, apr_pool_t *pool); |
|---|
| 49 |
APR_DECLARE(apr_status_t) stomp_read(stomp_connection *connection, stomp_frame **frame, apr_pool_t *pool); |
|---|
| 50 |
|
|---|
| 51 |
#ifdef __cplusplus |
|---|
| 52 |
} |
|---|
| 53 |
#endif |
|---|
| 54 |
|
|---|
| 55 |
#endif /* ! STOMP_H */ |
|---|