OpenJPEG: auxtrans_manager.c File Reference

OpenJPEG 2.5.4

Data Structures | Macros | Typedefs | Functions
auxtrans_manager.c File Reference
`#include <stdio.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include "auxtrans_manager.h"`
`#include <pthread.h>`

## Data Structures
struct | aux_response_param

## Macros
#define | FCGI_stdout stdout
#define | FCGI_stderr stderr
#define | logstream stderr

## Typedefs
typedef struct aux_response_param | aux_response_param_t

## Functions
auxtrans_param_t | init_aux_transport (int tcp_auxport, int udp_auxport)
| Initialize auxiliary transport server of JPIP server.
void | close_aux_transport (auxtrans_param_t auxtrans)
| Close auxiliary transport server of JPIP server.
aux_response_param_t * | gene_auxresponse (OPJ_BOOL istcp, auxtrans_param_t auxtrans, const char cid[], void *data, OPJ_SIZE_T datalen, OPJ_SIZE_T maxlenPerFrame)
void | delete_auxresponse (aux_response_param_t **auxresponse)
void * | aux_streaming (void *arg)
void | send_responsedata_on_aux (OPJ_BOOL istcp, auxtrans_param_t auxtrans, const char cid[], void *data, OPJ_SIZE_T datalen, OPJ_SIZE_T maxlenPerFrame)
| Send response data on aux transport.
OPJ_BOOL | identify_cid (SOCKET connected_socket, char refcid[], FILE *fp)
| Identify cid sent from client.
OPJ_BOOL | recv_ack (SOCKET connected_socket, void *data)

## Macro Definition Documentation

## ◆ FCGI_stderr

#define FCGI_stderr stderr

Referenced by add_bigendian_bytestream(), add_body_stream(), add_placeholder_stream(), add_vbas_with_bytelen_stream(), associate_channel(), aux_streaming(), check_JP2boxidx(), const_metadatalist(), delete_target(), enqueue_metadata(), enqueue_tile(), fetch_1byte(), fetch_2bytebigendian(), fetch_4bytebigendian(), fetch_8bytebigendian(), fetch_bytes(), find_level(), gene_boxbyOffset(), gene_boxbyType(), gene_boxbyTypeinStream(), gene_childboxbyType(), gene_faixbox(), gene_target(), get_CODmkrdata_from_j2kstream(), get_filesize(), get_mainheader_from_j2kstream(), get_SIZmkrdata_from_j2kstream(), isJPPstream(), modify_COCmkrstream(), modify_CODmkrstream(), modify_mainheader(), modify_SIZmkrstream(), modify_tileheader(), open_listeningsocket(), open_remotefile(), parse_jp2file(), receive_line(), receive_stream(), recons_bitstream(), search_box(), search_boxheader(), search_markeridx(), send_responsedata_on_aux(), send_stream(), set_cidxdata(), set_CODmkrdata(), set_cptrdata(), set_ppixdata(), set_SIZmkrdata(), set_thixdata(), and set_tpixdata().

## ◆ FCGI_stdout

#define FCGI_stdout stdout

Referenced by close_channel(), enqueue_metabins(), fetch_1byte(), fetch_bytes(), gene_channel(), gene_JPIPstream(), gene_target(), get_filesize(), identify_target(), map_viewin2imgreg(), open_jp2file(), open_remotefile(), search_channel(), and search_session_and_channel().

## ◆ logstream

#define logstream stderr

Referenced by close_channel(), delete_cachemodel(), delete_channel(), delete_channellist(), delete_session(), delete_sessionlist(), delete_target(), gene_cachemodel(), gene_target(), insert_cachemodel_into_session(), parse_jp2file(), print_allbox(), print_allchannel(), print_allmetadata(), print_allplaceholder(), print_allsession(), print_box(), print_boxheader(), print_cachemodel(), print_COD(), print_codestream(), print_faixbox(), print_imgreg(), print_index(), print_markeridx(), print_metadata(), print_mhixbox(), print_msgqueue(), print_placeholder(), print_queryparam(), print_SIZ(), and print_target().

## Typedef Documentation

## ◆ aux_response_param_t

typedef struct aux_response_param aux_response_param_t

## Function Documentation

## ◆ aux_streaming()

void * aux_streaming | ( | void * | arg | ) |

References accept_socket(), aux_response_param::cid, close_socket(), aux_response_param::data, aux_response_param::datalen, delete_auxresponse(), FCGI_stderr, identify_cid(), aux_response_param::listensock, aux_response_param::maxlenPerFrame, opj_free(), opj_malloc(), recv_ack(), and send_stream().

Referenced by send_responsedata_on_aux().

## ◆ close_aux_transport()

void close_aux_transport | ( | auxtrans_param_t | auxtrans | ) |

Close auxiliary transport server of JPIP server.

auxiliary response parameters

References close_socket(), auxtrans_param::tcplistensock, and auxtrans_param::udplistensock.

## ◆ delete_auxresponse()

void delete_auxresponse | ( | aux_response_param_t ** | auxresponse | ) |

References opj_free().

Referenced by aux_streaming().

## ◆ gene_auxresponse()

aux_response_param_t * gene_auxresponse | ( | OPJ_BOOL | istcp,
|  | auxtrans_param_t | auxtrans,
|  | const char | cid[],
|  | void * | data,
|  | OPJ_SIZE_T | datalen,
|  | OPJ_SIZE_T | maxlenPerFrame )

References aux_response_param::cid, aux_response_param::data, aux_response_param::datalen, aux_response_param::listensock, aux_response_param::maxlenPerFrame, opj_malloc(), auxtrans_param::tcplistensock, and auxtrans_param::udplistensock.

Referenced by send_responsedata_on_aux().

## ◆ identify_cid()

OPJ_BOOL identify_cid | ( | SOCKET | connected_socket,
|  | char | refcid[],
|  | FILE * | fp )

Identify cid sent from client.

Parameters

  [in] | connected_socket | file descriptor of the connected socket
  [in] | refcid | refenrece channel ID
  [in] | fp | file pointer for log of aux stream

Returns
  true if identified, false otherwise

References OPJ_FALSE, opj_free(), OPJ_TRUE, and receive_string().

Referenced by aux_streaming().

## ◆ init_aux_transport()

auxtrans_param_t init_aux_transport | ( | int | tcp_auxport,
|  | int | udp_auxport )

Initialize auxiliary transport server of JPIP server.

Parameters

  [in] | tcp_auxport | opening tcp auxiliary port ( 0 not to open, valid No. 49152-65535)
  [in] | udp_auxport | opening udp auxiliary port ( 0 not to open, valid No. 49152-65535)

Returns
  initialized transport parameters

References open_listeningsocket(), auxtrans_param::tcpauxport, auxtrans_param::tcplistensock, auxtrans_param::udpauxport, and auxtrans_param::udplistensock.

## ◆ recv_ack()

OPJ_BOOL recv_ack | ( | SOCKET | connected_socket,
|  | void * | data )

References OPJ_FALSE, opj_free(), OPJ_TRUE, and receive_stream().

Referenced by aux_streaming().

## ◆ send_responsedata_on_aux()

void send_responsedata_on_aux | ( | OPJ_BOOL | istcp,
|  | auxtrans_param_t | auxtrans,
|  | const char | cid[],
|  | void * | data,
|  | OPJ_SIZE_T | length,
|  | OPJ_SIZE_T | maxlenPerFrame )

Send response data on aux transport.

Parameters

  [in] | istcp | true if tcp, false if udp
  [in] | auxtrans | available transport parameters
  [in] | cid | channel ID
  [in] | data | sending data
  [in] | length | length of data
  [in] | maxlenPerFrame | maximum data length to send per frame

References aux_streaming(), FCGI_stderr, gene_auxresponse(), and auxtrans_param::tcplistensock.