func NewSrsClient(conn *net.TCPConn) (r *SrsClient, err error) { r = &SrsClient{} r.conn = conn r.res = NewSrsResponse() r.id = SrsGenerateId() if r.rtmp, err = rtmp.NewServer(conn); err != nil { return } r.req = rtmp.NewRequest() return }
func NewSrsClient(conn *net.TCPConn, server *SrsServer) (r *SrsClient, err error) { r = &SrsClient{ conn: conn, res: NewSrsResponse(), id: SrsGenerateId(), server: server, } if r.rtmp, err = rtmp.NewServer(conn); err != nil { return } r.req = rtmp.NewRequest() return }