R
Ravnø Data
Guest
Im my windows forms program I send notification to smartphones.
Heres a bit of the code:
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(expoData)
request.Method = "POST"
request.ContentType = "application/json"
request.ContentLength = byteArray.Length
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
dataStream.Dispose()
byteArray = Nothing
request = Nothing
Sometimes the server has quite a long response-time - up to one minute. This causes the program to 'Wait'
Is there a way to 'not wait for the server to respond' but let the program continue ?
And when the server responds the close, dispose etc. is executed
Continue reading...
Heres a bit of the code:
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(expoData)
request.Method = "POST"
request.ContentType = "application/json"
request.ContentLength = byteArray.Length
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
dataStream.Dispose()
byteArray = Nothing
request = Nothing
Sometimes the server has quite a long response-time - up to one minute. This causes the program to 'Wait'
Is there a way to 'not wait for the server to respond' but let the program continue ?
And when the server responds the close, dispose etc. is executed
Continue reading...