- Notifications
You must be signed in to change notification settings - Fork0
License
NotificationsYou must be signed in to change notification settings
custompbx/hepparser
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Its part ofheplify-server. Possible to use inside your project.
###Example usage:
import ("github.com/custompbx/hepparser""net" )constmaxPktLen=8192constaddr="127.0.0.1:9060"funcListener() {ua,err:=net.ResolveUDPAddr("udp",addr)iferr!=nil {return }uc,err:=net.ListenUDP("udp",ua)iferr!=nil {return }for {buf:=make([]byte,maxPktLen)n,err:=uc.Read(buf)iferr!=nil {log.Printf("%v\n return",err)return }elseifn>maxPktLen {continue }goparser(buf[:n]) } }funcparser(packet) {hepPacket,err:=hepparser.DecodeHEP(packet)iferr!=nil {log.Println(err)return }// Do whatever with packet -- hepPacket }
About
No description, website, or topics provided.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.