Git Product home page Git Product logo

Comments (6)

jart avatar jart commented on September 3, 2024

Fuzzing is an even smarter way to do it than the RFC torture tests. I'd welcome a change like this.

from gosip.

negbie avatar negbie commented on September 3, 2024

Did you have considered to move the SIP, SDP parser into a separate repository? This would reduce the scope and mby gain more search hit's? Since I've used Ragel in some projects myself (like fast CSeq parser) I know that it's mby not the fastest way to build a SIP parser BUT it's a good way to build a fast and correct one. Your implementation has a good quality, better than the most others you can find for Go on Github. Just thinking out loud ;)

from gosip.

jart avatar jart commented on September 3, 2024

Would that help people only link the parts they need? If so I say let's do that.
What do you think of naming the directories sip/parse/ and sdp/parse/?

from gosip.

negbie avatar negbie commented on September 3, 2024

I still think there is a lack of a fast and correct general purpose SIP/SDP parser in Go. Probably because of this some of the existing SIP stacks in Go on Github come with their own implementations.

What do you think of naming the directories sip/parse/ and sdp/parse/?

With the current function names this would result in

...parse.Parse() (for SDP)
...parse.ParseMsg (for SIP)

Go also has a parser package https://golang.org/pkg/go/parser

Shadowing that style it could be sip/parser/ and sdp/parser/ like:
parser.ParseSIP()
parser.ParseSDP()

from gosip.

jart avatar jart commented on September 3, 2024

Ah yes that's a good point, regarding Go readability. Taking a quick glance at the Effective Go guide, how about sip/sipfsm and sdp/sdpfsm which are succinct, unique, and short for Finite State Machine.

Out of curiosity, does the Go linker do the equivalent of -ffunction-sections? We might want to try building a binary that only references the existing sip.ParseSIP() function and verifying that it doesn't schlep in things like the dialog and socket code.

from gosip.

negbie avatar negbie commented on September 3, 2024

Taking a quick glance at the Effective Go guide, how about sip/sipfsm and sdp/sdpfsm which are succinct, unique, and short for Finite State Machine.

+1

Out of curiosity, does the Go linker do the equivalent of -ffunction-sections? We might want to try building a binary that only references the existing sip.ParseSIP() function and verifying that it doesn't schlep in things like the dialog and socket code.

Go's nearest equivalent of -ffunction-sections are Build Constraints better known as build tags.
https://golang.org/pkg/go/build/#hdr-Build_Constraints

Currently you don't use any external dependencies and without having a huge codebase I think it's probably not worth the effort.

from gosip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.