OpenJPEG  2.1.0
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. More...
 
void close_aux_transport (auxtrans_param_t auxtrans)
 Close auxiliary transport server of JPIP server. More...
 
aux_response_param_tgene_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. More...
 
OPJ_BOOL identify_cid (SOCKET connected_socket, char refcid[], FILE *fp)
 Identify cid sent from client. More...
 
OPJ_BOOL recv_ack (SOCKET connected_socket, void *data)
 

Macro Definition Documentation

#define FCGI_stderr   stderr
#define FCGI_stdout   stdout
#define logstream   stderr

Typedef Documentation

Function Documentation

void * aux_streaming ( void *  arg)
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.

void delete_auxresponse ( aux_response_param_t **  auxresponse)

References opj_free.

Referenced by aux_streaming().

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 
)
OPJ_BOOL identify_cid ( SOCKET  connected_socket,
char  refcid[],
FILE *  fp 
)

Identify cid sent from client.

Parameters
[in]connected_socketfile descriptor of the connected socket
[in]refcidrefenrece channel ID
[in]fpfile 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().

auxtrans_param_t init_aux_transport ( int  tcp_auxport,
int  udp_auxport 
)

Initialize auxiliary transport server of JPIP server.

Parameters
[in]tcp_auxportopening tcp auxiliary port ( 0 not to open, valid No. 49152-65535)
[in]udp_auxportopening udp auxiliary port ( 0 not to open, valid No. 49152-65535)
Returns
intialized transport parameters

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

OPJ_BOOL recv_ack ( SOCKET  connected_socket,
void *  data 
)

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

Referenced by aux_streaming().

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]istcptrue if tcp, false if udp
[in]auxtransavailable transport parameters
[in]cidchannel ID
[in]datasending data
[in]lengthlength of data
[in]maxlenPerFramemaximum data length to send per frame

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