func NewTrapServer() (*TrapServer, error) {
	config, err := ReadConfig()
	if err != nil {
		return nil, err
	}

	packets := make(PacketsChannel, packetsChanSize)

	listener, err := startSNMPv2Listener(config, packets)
	if err != nil {
		return nil, err
	}

	server := &TrapServer{
		listener: listener,
		config:   config,
		packets:  packets,
	}

	return server, nil
}
// NewTrapServer configures and returns a running SNMP traps server.
NewTrapServer configures and returns a running SNMP traps server.
// NewTrapServer configures and returns a running SNMP traps server .
func NewTrapServer() (*TrapServer, error) {
	config, err := ReadConfig()
	if err != nil {
		return nil, err
	}
	packets := make(PacketsChannel, packetsChanSize)
	listener, err := startSNMPv2Listener(config, packets)
	if err != nil {
		return nil, err
	}
	server := &TrapServer{
		listener: listener,
		config:   config,
		packets:  packets,
	}
	return server, nil
}
func NewTrapServer ( ) ( * TrapServer , error ) { config , err := ReadConfig ( ) if err != nil { return nil , err } packets := make ( PacketsChannel , packetsChanSize ) listener , err := startSNMPv2Listener ( config , packets ) if err != nil { return nil , err } server := & TrapServer { listener : listener , config : config , packets : packets , } return server , nil }
NewTrapServer configures and returns a running SNMP traps server.
NewTrapServer configures and returns a running SNMP traps server .