Search documentation of snmpkit

# SnmpKit.SnmpSim.Core.Server (snmpkit v1.3.17)

High-performance UDP server for SNMP request handling. Supports concurrent packet processing with minimal latency.

# Summary

## Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

get_stats(server_pid)

Get server statistics.

set_device_handler(server_pid, handler)

Update the device handler function.

start_link(port, opts \\ [])

Start an SNMP UDP server on the specified port.

# Functions

# child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# get_stats(server_pid)

Get server statistics.

# set_device_handler(server_pid, handler)

Update the device handler function.

# start_link(port, opts \\ [])

Start an SNMP UDP server on the specified port.

## Options

- `:community` - SNMP community string (default: "public")
- `:device_handler` - Module or function to handle device requests
- `:socket_opts` - Additional socket options

## Examples

    {:ok, server} = SnmpKit.SnmpSim.Core.Server.start_link(9001,
      community: "public",
      device_handler: &MyDevice.handle_request/2
    )