logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
doggy  
#1 Posted : Thursday, June 2, 2016 9:58:16 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,221
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Hi all

Need some advice.

Sending httprequest from a client program to get data to vMix titles seems at some point to slow down or worse temporarly stop my client program especially multiple fast updating titles values. ( even simply sending multiple values to multiple fields one notices delays between each )

For the experts could this be related to response times of these requests made ?

In an extreem effort I like to send stopwatch (not clock) data to a title

ps client is written in vb.net
tesn  
#2 Posted : Thursday, June 2, 2016 12:17:38 PM(UTC)
tesn

Rank: Advanced Member

Groups: Registered
Joined: 8/22/2013(UTC)
Posts: 92
Man
Location: Rochester, NY

Was thanked: 13 time(s) in 9 post(s)
doggy wrote:
Hi all

Need some advice.

Sending httprequest from a client program to get data to vMix titles seems at some point to slow down or worse temporarly stop my client program especially multiple fast updating titles values. ( even simply sending multiple values to multiple fields one notices delays between each )

For the experts could this be related to response times of these requests made ?

In an extreem effort I like to send stopwatch (not clock) data to a title

ps client is written in vb.net


You can change the request timeout. Here's what I do (changes the text of a title):

Code:
 Public Function setvMixText(ByVal titleKey As String, ByVal inTitle As String, ByVal setText As String) As Boolean
        Try

            ' Create a request for the URL. 
            Dim request As WebRequest = WebRequest.Create("http://localhost:8088/API/?Function=SetText&Input=" & titleKey & "&SelectedName=" & inTitle & "&Value=" & setText)
            ' If required by the server, set the credentials.
            request.Credentials = CredentialCache.DefaultCredentials
            request.Timeout = 1000
            ' Get the response.
            Dim response As WebResponse = request.GetResponse()
            ' Display the status.
            Debug.Print(CType(response, HttpWebResponse).StatusDescription)
            ' Get the stream containing content returned by the server.
            Dim dataStream As Stream = response.GetResponseStream()
            ' Open the stream using a StreamReader for easy access.
            Dim reader As New StreamReader(dataStream)
            ' Read the content.
            Dim responseFromServer As String = reader.ReadToEnd()
            ' Display the content.
            Debug.Print(responseFromServer)
            ' Clean up the streams and the response.
            reader.Close()
            response.Close()
            Return True

        Catch ex As Exception
            Return False
        End Try
    End Function


thanks 1 user thanked tesn for this useful post.
stigaard on 6/2/2016(UTC)
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.