Can a session created with Single API be used by multiple threads?

Xiangyang Shen <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello,

I'm writing an application program that uses thread pool to monitor 
multiple snmp agents and provides data services to its clients.

I went through README.thread and NetSnmp User mail archive. I understand 
it's not MT safe if I use V3. But in case of v1 & v2 it isn't clear to 
me that if a session is opened with Single APIs in main thread for a 
agent before the thread pool is created
- can the session be used by multiple threads safely to send request to 
the agent?
- if a session can't be shared by MT, can each thread in the thread pool 
open multiple sessions (for different agents) with Single APIs then use 
them safely?
- or Single APIs means each thread can only use one session created by 
the thread?

The current project design is to open a session for each monitored 
agent. A thread getting a data request from client will find the proper 
session then uses the session to send snmp request to the target agent. 
Since we don't have control about which thread will get the request from 
a client for which agent data (requests are sent through CORBA calls) we 
can't use dedicated thread to serve an agent (i.e. 
per-thread-per-session module). Will the design have thread safe problem 
even using Single APIs?

Thanks for your help in advance,
Xianygang


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.