Files
onvif-go/.claude/examples copy/simple-server/main.go
T
ProtoTess 19db372cdc Add ONVIF types and structures for device capabilities and configurations
- Introduced comprehensive data structures for ONVIF device information, capabilities, media profiles, and configurations.
- Added types for device services, network settings, imaging options, audio/video configurations, and user management.
- Implemented structures for handling various ONVIF features including PTZ control, event subscriptions, and analytics configurations.
- Enhanced support for network protocols, security settings, and system logging.
2026-01-16 04:37:59 +00:00

29 lines
426 B
Go

package main
import (
"context"
"fmt"
"log"
"github.com/0x524a/onvif-go/server"
)
func main() {
fmt.Println("Starting ONVIF Server on port 8081...")
fmt.Println("Press Ctrl+C to stop")
fmt.Println()
config := server.DefaultConfig()
config.Port = 8081
srv, err := server.New(config)
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
if err := srv.Start(ctx); err != nil {
log.Fatal(err)
}
}