Discussion:
thanks landay and some question
(too old to reply)
zhangych
2008-11-19 15:17:28 UTC
Permalink
Thanks alot first.
Why i use the sync API to service 40 sessions,one of 40 session slow will
cause the delays for other 39.
Each session do his seperate transaction,each thread wait the host response
back,they will impact each other?

Can the send type with AP_SEND_DATA_P_TO_R_CONFIRM used by APPC can be
seperated with APPC_Async API?
just like:
void * recv(vcb,tp_id,conv_id,corr);
{
wait n seconds;
APPC_Async();//check receive back
...
}

rc = APPC_Async(vcb,recv,corr);

Can give a Async Clinet Samples to me?
l***@attglobal.net
2008-11-22 09:06:56 UTC
Permalink
Post by zhangych
Why i use the sync API to service 40 sessions,one of 40 session slow will
cause the delays for other 39.
Each session do his seperate transaction,each thread wait the host response
back,they will impact each other?
I don't know, but I assume this is in the book for a reason:
If the application performs multiple tasks (such as
communicating with more than one remote program at a
time, or performing other processing in addition to
APPC verbs), you may need to ensure that it does not
suspend while waiting for information. In this case,
the application should use the APPC_Async (asynchronous)
entry point, supplying a callback routine that CS/AIX
can use to return information when it is available
Post by zhangych
Can the send type with AP_SEND_DATA_P_TO_R_CONFIRM used by APPC
can be seperated with APPC_Async API?
void * recv(vcb,tp_id,conv_id,corr);
{
wait n seconds;
APPC_Async();//check receive back
...
}
rc = APPC_Async(vcb,recv,corr);
I would avoid mixing APPC() and APPC_Async() in the same program.
The CS/AIX APPC Programmer's Guide" has this warning
Multiple verbs do not necessarily complete in the order
in which they were issued. In particular, if an application
issues an asynchronous verb followed by a synchronous verb,
the completion of the synchronous verb does not guarantee
that the asynchronous verb has already completed.
Post by zhangych
Can give a Async Client Samples to me?
I have attached a simple APPC async example.
It uses the older SNA_USE_FD_SCHED() instead of threads.
Using threads is preferred.


Paul Landay

Loading...