go - Proper responses for RTMPT requests -


i'm attempting convert rtmpt rtmp in go. understand should quite simple request bodies made on rtmpt regular rtmp connection passing, , far that's remained true. issues i've come across respond these http requests. documentation helpful.

  • /open return 200 session id in body. that's done , works.
  • /idle specifies return integer interval time. assumed meant time between idle requests. assumed setting either 10 or 10000 spread requests out 10 seconds, instead sends idle request right away after every return.
  • /send has no documentation @ all. returning 200s doesn't seem enough no more send requests obs received.

i've put small go script demonstrate progress far. in end /idle , /send still don't seem work. proper responses them? thanks.

package main  import (     "bytes"      "github.com/labstack/echo"     fastengine "github.com/labstack/echo/engine/fasthttp" )  func main() {     app := echo.new()      app.post("/open/:n", func(ctx echo.context) error {         return ctx.string(200, "12345")     })      app.post("/idle/:session_id/:seq", func(ctx echo.context) error {         return ctx.string(200, "10000") // doesn't set interval between requests     })      app.post("/send/:session_id/:seq", func(ctx echo.context) error {         buf := new(bytes.buffer)         buf.readfrom(ctx.request().body())         processrtmpbuf(buf)         return ctx.string(200, "") // doesn't work, no more send requests received obs     })      app.run(fastengine.new(":8080")) } 


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -