Make sync request using IP/UDP with request timeouts and retries.

Namespace:  SnmpSharpNet
Assembly:  SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public byte[] Request(
	IPAddress peer,
	int port,
	byte[] buffer,
	int bufferLength,
	int timeout,
	int retries
)
Public Function Request ( _
	peer As IPAddress, _
	port As Integer, _
	buffer As Byte(), _
	bufferLength As Integer, _
	timeout As Integer, _
	retries As Integer _
) As Byte()
public:
array<unsigned char>^ Request(
	IPAddress^ peer, 
	int port, 
	array<unsigned char>^ buffer, 
	int bufferLength, 
	int timeout, 
	int retries
)

Parameters

peer
IPAddress
SNMP agent IP address
port
Int32
SNMP agent port number
buffer
array< Byte >[]()[]
Data to send to the agent
bufferLength
Int32
Data length in the buffer
timeout
Int32
Timeout in milliseconds
retries
Int32
Maximum number of retries. 0 = make a single request with no retry attempts

Return Value

Byte array returned by the agent. Null on error

Exceptions

ExceptionCondition
SnmpSharpNet..::.SnmpExceptionThrown on request timed out. SnmpException.ErrorCode is set to SnmpException.RequestTimedOut constant.

See Also