yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
Session and IO Handling

NCX server provides sockets and receives IO from sessions. More...

Collaboration diagram for Session and IO Handling:

Functions

status_t agt_ncxserver_run (void)
 IO server loop for the ncxserver socket. More...
 
status_t agt_ncxserver_run_ycontrol (boolean ycontrol, const xmlChar *txid_str)
 IO server loop for the ncxserver socket. More...
 
status_t agt_ncxserver_run_extloop (boolean ycontrol, const xmlChar *txid_str, boolean extloop_mode)
 IO server loop for the ncxserver socket (FULL MODE) More...
 
void agt_ncxserver_clear_fd (int fd)
 Clear a dead session from the select loop. More...
 
void agt_ncxserver_exit_ycontrol_mode (const xmlChar *txid_str, agt_exit_mode_t exitmode)
 Cause the ycontrol mode to terminate. More...
 
void agt_ncxserver_exit_ycontrol_mode_edit (const xmlChar *txid_str, agt_exit_mode_t exitmode, boolean need_reverse_edit)
 Cause the ycontrol mode to terminate, EDIT mode. More...
 
agt_exit_mode_t agt_ncxserver_get_exit_mode (const xmlChar *txid_str)
 Get the reason code for exiting YControl IO mode. More...
 
thd_tcb_tagt_ncxserver_get_timer_tcb (void)
 Get the timer TCB to hijack for the YP-HA standby SCB. More...
 
boolean agt_ncxserver_thread_clear_session (ses_id_t sid, ses_id_t killedby, ses_term_reason_t termreason)
 Signal session clear to the appropriate RX thread for session. More...
 
void agt_ncxserver_thd_ses_cleanup (thd_type_t thd_type)
 Clean sessions in fixed (safe) order to make sure that all active sessions will be closed in a particular order. More...
 
boolean agt_ncxserver_thread_cancel_cc (ses_id_t sid, ncx_confirm_event_t event)
 Signal confirmed commit cancel to either the thread representing session or, if terminated, to another thread capable of handling the cancel. More...
 
status_t agt_ncxserver_inject_session (ses_cb_t *scb, int newfd)
 Add a callhome session into the ncxserver IO processing. More...
 
void agt_ncxserver_cleanup_extloop (void)
 Cleanup sockets for extloop mode. More...
 

Detailed Description

NCX server provides sockets and receives IO from sessions.

Built-in transport and <ncx-connect> handling used to listen to the NCX socket for internal thin clients.

Function Documentation

◆ agt_ncxserver_cleanup_extloop()

void agt_ncxserver_cleanup_extloop ( void  )

Cleanup sockets for extloop mode.

Called by the server during shutdown

Here is the call graph for this function:

◆ agt_ncxserver_clear_fd()

void agt_ncxserver_clear_fd ( int  fd)

Clear a dead session from the select loop.

Parameters
fdfile descriptor number for the socket to clear
Here is the caller graph for this function:

◆ agt_ncxserver_exit_ycontrol_mode()

void agt_ncxserver_exit_ycontrol_mode ( const xmlChar *  txid_str,
agt_exit_mode_t  exitmode 
)

Cause the ycontrol mode to terminate.

Parameters
txid_strtransaction ID to exit mode for
exitmodereason for exiting YControl IO mode
Here is the caller graph for this function:

◆ agt_ncxserver_exit_ycontrol_mode_edit()

void agt_ncxserver_exit_ycontrol_mode_edit ( const xmlChar *  txid_str,
agt_exit_mode_t  exitmode,
boolean  need_reverse_edit 
)

Cause the ycontrol mode to terminate, EDIT mode.

Parameters
txid_strtransaction ID to exit mode for
exitmodereason for exiting YControl IO mode
need_reverse_editTRUE to flag a reverse-edit needed

◆ agt_ncxserver_get_exit_mode()

agt_exit_mode_t agt_ncxserver_get_exit_mode ( const xmlChar *  txid_str)

Get the reason code for exiting YControl IO mode.

Can only be called once for each txid value!!! Causes stored txid_in_progress record to be deleted

Parameters
txid_strtransaction ID to check exit mode for
Returns
exit mode enumeration
Here is the caller graph for this function:

◆ agt_ncxserver_get_timer_tcb()

thd_tcb_t * agt_ncxserver_get_timer_tcb ( void  )

Get the timer TCB to hijack for the YP-HA standby SCB.

Returns
tcb
Here is the caller graph for this function:

◆ agt_ncxserver_inject_session()

status_t agt_ncxserver_inject_session ( ses_cb_t scb,
int  newfd 
)

Add a callhome session into the ncxserver IO processing.

Parameters
scbsession control block already started
newfdfile descriptor number for the session
Returns
status
Here is the call graph for this function:

◆ agt_ncxserver_run()

status_t agt_ncxserver_run ( void  )

IO server loop for the ncxserver socket.

Returns
status
Here is the call graph for this function:

◆ agt_ncxserver_run_extloop()

status_t agt_ncxserver_run_extloop ( boolean  ycontrol,
const xmlChar *  txid_str,
boolean  extloop_mode 
)

IO server loop for the ncxserver socket (FULL MODE)

Parameters
ycontrolTRUE if this is a reentrant call ibn order to process <ycontrol> messages while an <rpc> on a user session is waiting
FALSE for the normal invocation from the main loop
txid_strtransaction ID string for the ycontrol transaction in progress
NULL if ycontrol FALSE
extloop_modeTRUE if this is a one-shot running is some other main loop.
FALSE if this is either real or ycontrol mode
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_ncxserver_run_ycontrol()

status_t agt_ncxserver_run_ycontrol ( boolean  ycontrol,
const xmlChar *  txid_str 
)

IO server loop for the ncxserver socket.

Parameters
ycontrolTRUE if this is a reentrant call ibn order to process <ycontrol> messages while an <rpc> on a user session is waiting
FALSE for the normal invocation from the main loop
txid_strtransaction ID string for the ycontrol transaction in progress; NULL if ycontrol FALSE
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_ncxserver_thd_ses_cleanup()

void agt_ncxserver_thd_ses_cleanup ( thd_type_t  thd_type)

Clean sessions in fixed (safe) order to make sure that all active sessions will be closed in a particular order.

And will never be closed at the same time during server shutdown request.

Parameters
thd_typetype of the thread
Here is the call graph for this function:

◆ agt_ncxserver_thread_cancel_cc()

boolean agt_ncxserver_thread_cancel_cc ( ses_id_t  sid,
ncx_confirm_event_t  event 
)

Signal confirmed commit cancel to either the thread representing session or, if terminated, to another thread capable of handling the cancel.

Parameters
sidSession ID
eventReason for cancel request
Returns
boolean success or failure of signal attempt
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_ncxserver_thread_clear_session()

boolean agt_ncxserver_thread_clear_session ( ses_id_t  sid,
ses_id_t  killedby,
ses_term_reason_t  termreason 
)

Signal session clear to the appropriate RX thread for session.

Parameters
sidSession ID
killedbysession ID executing the kill-session or close-session
termreasontermination reason code
Returns
boolean success or failure of signal attempt
Here is the call graph for this function:
Here is the caller graph for this function: