| OpenJPEG 2.5.3
    | 
#include <sys/types.h>#include <sys/socket.h>#include <arpa/inet.h>#include <unistd.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include "sock_manager.h"| Macros | |
| #define | FCGI_stdout stdout | 
| #define | FCGI_stderr stderr | 
| #define | logstream stderr | 
| Functions | |
| SOCKET | open_listeningsocket (uint16_t port) | 
| open listening socket | |
| SOCKET | accept_socket (SOCKET listening_socket) | 
| accept a new connection to the listening socket | |
| void | send_stream (SOCKET connected_socket, const void *stream, OPJ_SIZE_T length) | 
| send data stream to client | |
| void * | receive_stream (SOCKET connected_socket, OPJ_SIZE_T length) | 
| receive data stream to client | |
| OPJ_SIZE_T | receive_line (SOCKET connected_socket, char *p) | 
| receive a string line (ending with ' ') from client | |
| char * | receive_string (SOCKET connected_socket) | 
| receive a string line (ending with ' ') from client, return malloc string | |
| int | close_socket (SOCKET sock) | 
| close socket | |
| #define FCGI_stderr stderr | 
Referenced by open_listeningsocket(), receive_line(), receive_stream(), and send_stream().
| #define FCGI_stdout stdout | 
| #define logstream stderr | 
accept a new connection to the listening socket
| listening_socket | listening socket | 
Referenced by accept_connection(), and aux_streaming().
| int close_socket | ( | SOCKET | sock | ) | 
close socket
| [in] | sock | closing socket | 
Referenced by aux_streaming(), close_aux_transport(), handle_clientreq(), open_listeningsocket(), and terminate_dec_server().
| SOCKET open_listeningsocket | ( | uint16_t | port | ) | 
open listening socket
| port | opening port number | 
References close_socket(), and FCGI_stderr.
Referenced by init_aux_transport(), and init_dec_server().
| OPJ_SIZE_T receive_line | ( | SOCKET | connected_socket, | 
| char * | buf ) | 
receive a string line (ending with '
') from client 
| [in] | connected_socket | file descriptor of the connected socket | 
| [out] | buf | string to be stored | 
References FCGI_stderr.
Referenced by handle_PNMreqMSG(), identify_clientmsg(), receive_JPIPstream(), and receive_string().
| void * receive_stream | ( | SOCKET | connected_socket, | 
| OPJ_SIZE_T | length ) | 
receive data stream to client
| [in] | connected_socket | file descriptor of the connected socket | 
| [in] | length | length of the receiving stream | 
References FCGI_stderr.
Referenced by receive_JPIPstream(), and recv_ack().
| char * receive_string | ( | SOCKET | connected_socket | ) | 
receive a string line (ending with '
') from client, return malloc string 
| [in] | connected_socket | file descriptor of the connected socket | 
References BUF_LEN, and receive_line().
Referenced by handle_CIDreqMSG(), handle_dstCIDreqMSG(), handle_JP2saveMSG(), handle_PNMreqMSG(), handle_SIZreqMSG(), handle_TIDreqMSG(), handle_XMLreqMSG(), and identify_cid().
| void send_stream | ( | SOCKET | connected_socket, | 
| const void * | stream, | ||
| OPJ_SIZE_T | length ) | 
send data stream to client
| [in] | connected_socket | file descriptor of the connected socket | 
| [in] | stream | data stream | 
| [in] | length | length of data stream | 
References FCGI_stderr.
Referenced by aux_streaming(), response_signal(), send_IDstream(), send_PNMstream(), send_SIZstream(), and send_XMLstream().