Search Unity

Best HTTP Released

Discussion in 'Assets and Asset Store' started by BestHTTP, Sep 11, 2013.

  1. Dynamoid-Megan

    Dynamoid-Megan

    Joined:
    Apr 16, 2015
    Posts:
    72
    Line 105 is the closing bracket before an "else" in
    Code (CSharp):
    1. void OnRequestFinished(HTTPRequest request, HTTPResponse response)
    2.     {
    3.         //Debug.Log ("Request Finished! Text received: " + response.DataAsText);
    4.         if (response.Cookies != null)
    After some more testing, I discovered this error is only happening from a specific office, and only when a domain name is typed in instead of the IP address of the server. I don't know why that would happen however, as it works fine for me from where I am connecting to the internet from.
     
  2. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @Dynamoid Megan Looks like on these client machines the IP address of the server can't be resolved through the DNS server. Maybe something blocks it(an Antivirus, or other solution).

    To better understand what happens, i would advise that your callback function should look like this:
    Code (CSharp):
    1. void OnRequestFinished(HTTPRequest request, HTTPResponse resp)
    2. {
    3.     switch (request.State)
    4.     {
    5.         // The request finished without any problem.
    6.         case HTTPRequestStates.Finished:
    7.             if (resp.IsSuccess)
    8.             {
    9.                 // Log out the identifier of the request, and the response from the server.
    10.                 Debug.Log("Request Finished Successfully! Text: " + resp.DataAsText);
    11.  
    12.                 // TODO
    13.                 if (response.Cookies != null)
    14.                 {
    15.                   // ...
    16.                 }
    17.             }
    18.             else
    19.                 Debug.LogWarning(string.Format("Request Finished Successfully, but the server sent an error. Status Code: {0}-{1} Message: {2}",
    20.                                                 resp.StatusCode,
    21.                                                 resp.Message,
    22.                                                 resp.DataAsText));
    23.             break;
    24.  
    25.         // The request finished with an unexpected error. The request's Exception property may contain more info about the error.
    26.         case HTTPRequestStates.Error:
    27.             Debug.LogWarning("Request Finished with Error! " + (request.Exception != null ? (request.Exception.Message + "\n" + request.Exception.StackTrace) : "No Exception"));
    28.             break;
    29.  
    30.         // The request aborted, initiated by the user.
    31.         case HTTPRequestStates.Aborted:
    32.             Debug.LogWarning("Request Aborted!");
    33.             break;
    34.  
    35.         // Ceonnecting to the server is timed out.
    36.         case HTTPRequestStates.ConnectionTimedOut:
    37.             Debug.LogError("Connection Timed Out!");
    38.             break;
    39.  
    40.         // The request didn't finished in the given time.
    41.         case HTTPRequestStates.TimedOut:
    42.             Debug.LogError("Processing the request Timed Out!");
    43.             break;
    44.         default:
    45.             Debug.LogError("What? " + request.State);
    46.             break;
    47.     }
    48. }
    It will print a - hopefully - more detailed error description.

    Edit: Or maybe they are behind a proxy?
     
    Last edited: Sep 17, 2015
  3. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    Trying to build for WSA (Universal 8.1) on Unity 5.2.0f3 results in this build error:
    Code (CSharp):
    1. Assets/Best HTTP (Pro)/BestHTTP/PlatformSupport/TcpClient/WinRT/DataReaderWriterStream.cs(5,7): error CS0246: The type or namespace name `Windows' could not be found. Are you missing a using directive or an assembly reference?
    Any idea how to solve this?
     
  4. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @fantastisch_ Make sure that under the Player Settings/Publishing Settings the Compilation Overrides is set to "Use Net Core". It's required because this way Unity will use the installed Windows SDK to compile the source.
     
  5. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    Thank you for the swift response!
     
  6. ayalasan

    ayalasan

    Joined:
    Dec 10, 2012
    Posts:
    16
    @BestHTTP

    The HTTPUpdateDelegator.Update() method appears to be the top consuming element on the Profiler. It appears to be allocating a bunch of memory, even though my app is in idle state (without making any more that a couple of initial requests). This makes GC kick in agressively and so making my app stall really bad.

    I am wondering if I am implementing BestHttp in a bad way or maybe I am leaking? Should I be calling Dispose or any other performance preventive methods? Any one that has already suffered this issue, help would be really appreciated.

    Thanks in advance
     

    Attached Files:

    Last edited: Sep 19, 2015
  7. LutendoInteractive

    LutendoInteractive

    Joined:
    Nov 20, 2013
    Posts:
    2
    @BestHTTP

    When I try to build a Windows Phone 8 app in Unity 4.6.3, I get below error in post processing stage. It worked perfectly on IOS & Android platforms. Do I need to do something special for Windows platform ?

    Code (CSharp):
    1. Error building Player: Exception: Error: type `System.Security.Cryptography.MD5` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String BestHTTP.Extensions.Extensions::CalculateMD5Hash(System.Byte[]).
    2. Error: type `System.Security.Cryptography.MD5` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String BestHTTP.Extensions.Extensions::CalculateMD5Hash(System.Byte[]).
    3. Error: method `System.Security.Cryptography.MD5 System.Security.Cryptography.MD5::Create()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String BestHTTP.Extensions.Extensions::CalculateMD5Hash(System.Byte[]).
    4. Error: type `System.Net.Security.SslStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    5. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    6. Error: type `System.Net.Security.SslPolicyErrors` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    7. Error: type `System.Net.Security.RemoteCertificateValidationCallback` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    8. Error: method `System.Void System.Net.Security.RemoteCertificateValidationCallback::.ctor(System.Object,System.IntPtr)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    9. Error: type `System.Net.Security.SslStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    10. Error: type `System.Net.Security.RemoteCertificateValidationCallback` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    11. Error: method `System.Void System.Net.Security.SslStream::.ctor(System.IO.Stream,System.Boolean,System.Net.Security.RemoteCertificateValidationCallback)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    12. Error: type `System.Net.Security.SslStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    13. Error: method `System.Boolean System.Net.Security.SslStream::get_IsAuthenticated()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    14. Error: type `System.Net.Security.SslStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    15. Error: method `System.Void System.Net.Security.SslStream::AuthenticateAsClient(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPConnection::Connect().
    16. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.HTTPConnection::<Connect>m__9(System.Object,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors).
    17. Error: type `System.Net.Security.SslPolicyErrors` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.HTTPConnection::<Connect>m__9(System.Object,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors).
    18. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.HTTPConnection::<Connect>m__9(System.Object,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors).
    19. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at BestHTTP.HTTPRequest.
    20. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at BestHTTP.HTTPRequest.
    21. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPRequest::add_CustomCertificationValidator(System.Func`4<BestHTTP.HTTPRequest,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Boolean>).
    22. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPRequest::add_CustomCertificationValidator(System.Func`4<BestHTTP.HTTPRequest,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Boolean>).
    23. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPRequest::add_CustomCertificationValidator(System.Func`4<BestHTTP.HTTPRequest,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Boolean>).
    24. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPRequest::add_CustomCertificationValidator(System.Func`4<BestHTTP.HTTPRequest,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Boolean>).
    25. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPRequest::remove_CustomCertificationValidator(System.Func`4<BestHTTP.HTTPRequest,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Boolean>).
    26. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPRequest::remove_CustomCertificationValidator(System.Func`4<BestHTTP.HTTPRequest,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Boolean>).
    27. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPRequest::remove_CustomCertificationValidator(System.Func`4<BestHTTP.HTTPRequest,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Boolean>).
    28. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPRequest::remove_CustomCertificationValidator(System.Func`4<BestHTTP.HTTPRequest,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Boolean>).
    29. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.HTTPRequest::CallCustomCertificationValidator(System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain).
    30. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.HTTPRequest::CallCustomCertificationValidator(System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain).
    31. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.HTTPRequest::CallCustomCertificationValidator(System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain).
    32. Error: type `System.Security.Cryptography.X509Certificates.X509Chain` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.HTTPRequest::CallCustomCertificationValidator(System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain).
    33. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPResponse::ReadUnknownSize(System.IO.Stream).
    34. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPResponse::ReadUnknownSize(System.IO.Stream).
    35. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPResponse::ReadUnknownSize(System.IO.Stream).
    36. Error: method `System.Boolean System.Net.Sockets.NetworkStream::get_DataAvailable()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.HTTPResponse::ReadUnknownSize(System.IO.Stream).
    37. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at BestHTTP.PlatformSupport.TcpClient.General.TcpClient.
    38. Error: type `System.Net.Sockets.LingerOption` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at BestHTTP.PlatformSupport.TcpClient.General.TcpClient.
    39. Error: type `System.Net.Sockets.LingerOption` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at BestHTTP.PlatformSupport.TcpClient.General.TcpClient.
    40. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_Client(System.Net.Sockets.Socket).
    41. Error: method `System.Int32 System.Net.Sockets.Socket::get_Available()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_Available().
    42. Error: type `System.Net.Sockets.SelectMode` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.PlatformSupport.TcpClient.General.TcpClient::IsConnected().
    43. Error: method `System.Boolean System.Net.Sockets.Socket::Poll(System.Int32,System.Net.Sockets.SelectMode)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.PlatformSupport.TcpClient.General.TcpClient::IsConnected().
    44. Error: method `System.Int32 System.Net.Sockets.Socket::get_Available()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.PlatformSupport.TcpClient.General.TcpClient::IsConnected().
    45. Error: method `System.Boolean System.Net.Sockets.Socket::get_ExclusiveAddressUse()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_ExclusiveAddressUse().
    46. Error: method `System.Void System.Net.Sockets.Socket::set_ExclusiveAddressUse(System.Boolean)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_ExclusiveAddressUse(System.Boolean).
    47. Error: type `System.Net.Sockets.LingerOption` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Net.Sockets.LingerOption BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_LingerState().
    48. Error: type `System.Net.Sockets.LingerOption` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Net.Sockets.LingerOption BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_LingerState().
    49. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Net.Sockets.LingerOption BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_LingerState().
    50. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Net.Sockets.LingerOption BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_LingerState().
    51. Error: method `System.Object System.Net.Sockets.Socket::GetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Net.Sockets.LingerOption BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_LingerState().
    52. Error: type `System.Net.Sockets.LingerOption` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Net.Sockets.LingerOption BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_LingerState().
    53. Error: type `System.Net.Sockets.LingerOption` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_LingerState(System.Net.Sockets.LingerOption).
    54. Error: type `System.Net.Sockets.LingerOption` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_LingerState(System.Net.Sockets.LingerOption).
    55. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_LingerState(System.Net.Sockets.LingerOption).
    56. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_LingerState(System.Net.Sockets.LingerOption).
    57. Error: method `System.Void System.Net.Sockets.Socket::SetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,System.Object)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_LingerState(System.Net.Sockets.LingerOption).
    58. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_NoDelay().
    59. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_NoDelay().
    60. Error: method `System.Object System.Net.Sockets.Socket::GetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_NoDelay().
    61. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_NoDelay(System.Boolean).
    62. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_NoDelay(System.Boolean).
    63. Error: method `System.Void System.Net.Sockets.Socket::SetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,System.Int32)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_NoDelay(System.Boolean).
    64. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_ReceiveBufferSize().
    65. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_ReceiveBufferSize().
    66. Error: method `System.Object System.Net.Sockets.Socket::GetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_ReceiveBufferSize().
    67. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_ReceiveBufferSize(System.Int32).
    68. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_ReceiveBufferSize(System.Int32).
    69. Error: method `System.Void System.Net.Sockets.Socket::SetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,System.Int32)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_ReceiveBufferSize(System.Int32).
    70. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_ReceiveTimeout().
    71. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_ReceiveTimeout().
    72. Error: method `System.Object System.Net.Sockets.Socket::GetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_ReceiveTimeout().
    73. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_ReceiveTimeout(System.Int32).
    74. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_ReceiveTimeout(System.Int32).
    75. Error: method `System.Void System.Net.Sockets.Socket::SetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,System.Int32)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_ReceiveTimeout(System.Int32).
    76. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_SendBufferSize().
    77. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_SendBufferSize().
    78. Error: method `System.Object System.Net.Sockets.Socket::GetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_SendBufferSize().
    79. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_SendBufferSize(System.Int32).
    80. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_SendBufferSize(System.Int32).
    81. Error: method `System.Void System.Net.Sockets.Socket::SetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,System.Int32)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_SendBufferSize(System.Int32).
    82. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_SendTimeout().
    83. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_SendTimeout().
    84. Error: method `System.Object System.Net.Sockets.Socket::GetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 BestHTTP.PlatformSupport.TcpClient.General.TcpClient::get_SendTimeout().
    85. Error: type `System.Net.Sockets.SocketOptionLevel` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_SendTimeout(System.Int32).
    86. Error: type `System.Net.Sockets.SocketOptionName` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_SendTimeout(System.Int32).
    87. Error: method `System.Void System.Net.Sockets.Socket::SetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,System.Int32)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::set_SendTimeout(System.Int32).
    88. Error: method `System.IAsyncResult System.Net.Sockets.Socket::BeginConnect(System.Net.EndPoint,System.AsyncCallback,System.Object)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::Connect(System.Net.IPEndPoint).
    89. Error: method `System.Void System.Net.Sockets.Socket::EndConnect(System.IAsyncResult)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::Connect(System.Net.IPEndPoint).
    90. Error: type `System.Net.Sockets.LingerOption` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::SetOptions().
    91. Error: type `System.Net.Sockets.LingerOption` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::SetOptions().
    92. Error: type `System.Net.Dns` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::Connect(System.String,System.Int32).
    93. Error: method `System.Net.IPAddress[] System.Net.Dns::GetHostAddresses(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::Connect(System.String,System.Int32).
    94. Error: method `System.Void System.Net.Sockets.Socket::EndConnect(System.IAsyncResult)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::EndConnect(System.IAsyncResult).
    95. Error: method `System.IAsyncResult System.Net.Sockets.Socket::BeginConnect(System.Net.IPAddress,System.Int32,System.AsyncCallback,System.Object)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.IAsyncResult BestHTTP.PlatformSupport.TcpClient.General.TcpClient::BeginConnect(System.Net.IPAddress,System.Int32,System.AsyncCallback,System.Object).
    96. Error: method `System.IAsyncResult System.Net.Sockets.Socket::BeginConnect(System.Net.IPAddress[],System.Int32,System.AsyncCallback,System.Object)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.IAsyncResult BestHTTP.PlatformSupport.TcpClient.General.TcpClient::BeginConnect(System.Net.IPAddress[],System.Int32,System.AsyncCallback,System.Object).
    97. Error: method `System.IAsyncResult System.Net.Sockets.Socket::BeginConnect(System.String,System.Int32,System.AsyncCallback,System.Object)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.IAsyncResult BestHTTP.PlatformSupport.TcpClient.General.TcpClient::BeginConnect(System.String,System.Int32,System.AsyncCallback,System.Object).
    98. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::Dispose(System.Boolean).
    99. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::Dispose(System.Boolean).
    100. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void BestHTTP.PlatformSupport.TcpClient.General.TcpClient::Dispose(System.Boolean).
    101. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.IO.Stream BestHTTP.PlatformSupport.TcpClient.General.TcpClient::GetStream().
    102. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.IO.Stream BestHTTP.PlatformSupport.TcpClient.General.TcpClient::GetStream().
    103. Error: method `System.Void System.Net.Sockets.NetworkStream::.ctor(System.Net.Sockets.Socket,System.Boolean)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.IO.Stream BestHTTP.PlatformSupport.TcpClient.General.TcpClient::GetStream().
    104. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.IO.Stream BestHTTP.PlatformSupport.TcpClient.General.TcpClient::GetStream().
    105. Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.IO.Stream BestHTTP.PlatformSupport.TcpClient.General.TcpClient::GetStream().
    106. Error: type `System.TimeZone` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String Org.BouncyCastle.Asn1.DerGeneralizedTime::CalculateGmtOffset().
    107. Error: type `System.TimeZone` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String Org.BouncyCastle.Asn1.DerGeneralizedTime::CalculateGmtOffset().
    108. Error: method `System.TimeZone System.TimeZone::get_CurrentTimeZone()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String Org.BouncyCastle.Asn1.DerGeneralizedTime::CalculateGmtOffset().
    109. Error: type `System.TimeZone` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String Org.BouncyCastle.Asn1.DerGeneralizedTime::CalculateGmtOffset().
    110. Error: method `System.TimeSpan System.TimeZone::GetUtcOffset(System.DateTime)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String Org.BouncyCastle.Asn1.DerGeneralizedTime::CalculateGmtOffset().
    111. Error: method `System.Int32 System.String::Compare(System.String,System.String,System.Boolean)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Int32 Org.BouncyCastle.Utilities.Platform::CompareIgnoreCase(System.String,System.String).
    112. Error: method `System.String System.Environment::GetEnvironmentVariable(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String Org.BouncyCastle.Utilities.Platform::GetEnvironmentVariable(System.String).
    113. Error: method `System.Void System.Collections.Hashtable::.ctor(System.Collections.IDictionary)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Collections.IDictionary Org.BouncyCastle.Utilities.Platform::CreateHashtable(System.Collections.IDictionary).
    114. Error: method `System.Text.Encoding System.Text.Encoding::get_ASCII()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String Org.BouncyCastle.Utilities.Strings::FromAsciiByteArray(System.Byte[]).
    115. Error: method `System.Text.Encoding System.Text.Encoding::get_ASCII()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Byte[] Org.BouncyCastle.Utilities.Strings::ToAsciiByteArray(System.Char[]).
    116. Error: method `System.Text.Encoding System.Text.Encoding::get_ASCII()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Byte[] Org.BouncyCastle.Utilities.Strings::ToAsciiByteArray(System.String).
    117. Error: method `System.String System.Convert::ToString(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Collections.Generic.List`1<Runners> EzUI_I5LandSimulation::ProcessRunners(System.Xml.XmlNodeList,System.Boolean).
    118. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5LandSimulation/<GetOddsFromCoral>c__Iterator3::MoveNext().
    119. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5LandSimulation/<GetOddsFromCoral>c__Iterator3::MoveNext().
    120. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5LandSimulation/<Coral_Account_ForSessionTimeOut>c__Iterator4::MoveNext().
    121. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5LandSimulation/<Coral_Account_ForSessionTimeOut>c__Iterator4::MoveNext().
    122. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5LandSimulation/<Coral_Account_ForSessionTimeOut>c__Iterator4::MoveNext().
    123. Error: method `System.DateTime System.Convert::ToDateTime(System.DateTime)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5LandSimulation/<Coral_Account_ForSessionTimeOut>c__Iterator4::MoveNext().
    124. Error: method `System.Void System.Globalization.CultureInfo::.ctor(System.String,System.Boolean)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void EzUI_I5Landscape::Start().
    125. Error: method `System.String System.Convert::ToString(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Collections.Generic.List`1<Runners> EzUI_I5Landscape::ProcessRunners(System.Xml.XmlNodeList,System.Boolean).
    126. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Landscape/<GetBGPFromOXIFeedCoroutine>c__IteratorA::MoveNext().
    127. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Landscape/<GetOddsFromCoral>c__IteratorD::MoveNext().
    128. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Landscape/<GetOddsFromCoral>c__IteratorD::MoveNext().
    129. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Landscape/<Coral_Account_ForSessionTimeOut>c__Iterator2F::MoveNext().
    130. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Landscape/<Coral_Account_ForSessionTimeOut>c__Iterator2F::MoveNext().
    131. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Landscape/<Coral_Account_ForSessionTimeOut>c__Iterator2F::MoveNext().
    132. Error: method `System.DateTime System.Convert::ToDateTime(System.DateTime)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Landscape/<Coral_Account_ForSessionTimeOut>c__Iterator2F::MoveNext().
    133. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5PortSimulation/<Coral_Account_ForSessionTimeOut>c__Iterator31::MoveNext().
    134. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5PortSimulation/<Coral_Account_ForSessionTimeOut>c__Iterator31::MoveNext().
    135. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5PortSimulation/<Coral_Account_ForSessionTimeOut>c__Iterator31::MoveNext().
    136. Error: method `System.DateTime System.Convert::ToDateTime(System.DateTime)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5PortSimulation/<Coral_Account_ForSessionTimeOut>c__Iterator31::MoveNext().
    137. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Portrait/<GetBGPFromOXIFeedCoroutine>c__Iterator34::MoveNext().
    138. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Portrait/<Coral_Account_ForSessionTimeOut>c__Iterator55::MoveNext().
    139. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Portrait/<Coral_Account_ForSessionTimeOut>c__Iterator55::MoveNext().
    140. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Portrait/<Coral_Account_ForSessionTimeOut>c__Iterator55::MoveNext().
    141. Error: method `System.DateTime System.Convert::ToDateTime(System.DateTime)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EzUI_I5Portrait/<Coral_Account_ForSessionTimeOut>c__Iterator55::MoveNext().
    142. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void CoralRestAPI::getPersonalnDetails(System.Xml.XmlNodeList,System.Boolean).
    143. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void CoralRestAPI::getPersonalnDetails(System.Xml.XmlNodeList,System.Boolean).
    144. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<RestAPI_Login>c__Iterator61::MoveNext().
    145. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<RestAPI_Login>c__Iterator61::MoveNext().
    146. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<RestAPI_Login>c__Iterator61::MoveNext().
    147. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<RestAPI_Login>c__Iterator61::MoveNext().
    148. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<RestAPI_Login>c__Iterator61::MoveNext().
    149. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<RestAPI_Login>c__Iterator61::MoveNext().
    150. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<RestAPI_Login>c__Iterator61::MoveNext().
    151. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<RestAPI_Login>c__Iterator61::MoveNext().
    152. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<Coral_account_details>c__Iterator63::MoveNext().
    153. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<OpenBet_Session>c__Iterator64::MoveNext().
    154. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<OpenBet_Session>c__Iterator64::MoveNext().
    155. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<OpenBet_Session>c__Iterator64::MoveNext().
    156. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<OpenBet_Session>c__Iterator64::MoveNext().
    157. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<OpenBet_Session>c__Iterator64::MoveNext().
    158. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<Coral_Account_ForWebViewClose>c__Iterator69::MoveNext().
    159. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<Coral_Account_ForWebViewClose>c__Iterator69::MoveNext().
    160. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<Coral_Account_ForWebViewClose>c__Iterator69::MoveNext().
    161. Error: method `System.Xml.XmlNodeList System.Xml.XmlNode::SelectNodes(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<Coral_Account_ForSessionTimeOut>c__Iterator6A::MoveNext().
    162. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<Coral_Account_ForSessionTimeOut>c__Iterator6A::MoveNext().
    163. Error: method `System.Xml.XmlNode System.Xml.XmlNode::SelectSingleNode(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean CoralRestAPI/<Coral_Account_ForSessionTimeOut>c__Iterator6A::MoveNext().
    164. Error: type `System.Net.IPHostEntry` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String SingletonDataClass::LocalIPAddress().
    165. Error: type `System.Net.Dns` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String SingletonDataClass::LocalIPAddress().
    166. Error: method `System.String System.Net.Dns::GetHostName()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String SingletonDataClass::LocalIPAddress().
    167. Error: type `System.Net.Dns` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String SingletonDataClass::LocalIPAddress().
    168. Error: type `System.Net.IPHostEntry` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String SingletonDataClass::LocalIPAddress().
    169. Error: method `System.Net.IPHostEntry System.Net.Dns::GetHostEntry(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String SingletonDataClass::LocalIPAddress().
    170. Error: type `System.Net.IPHostEntry` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String SingletonDataClass::LocalIPAddress().
    171. Error: method `System.Net.IPAddress[] System.Net.IPHostEntry::get_AddressList()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.String SingletonDataClass::LocalIPAddress().
    172.  
    Thanks in Advance
     
  8. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @ayalasan The plugin will clean up the resources that are not needed anymore, and it's reuses as much as it can. Especially in frequently called places as the HTTPManager.OnUpdate (this is the function that called from the HTTPUpdateDelegator.Update).
    The plugin itself shouldn't allocate so much memory(although it can vary according the downloaded data). If you have a specific reproduction case, i would be happy to check it out and see where and what's the problem.
     
  9. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @LutendoInteractive If you are using the latest version of the plugin you can find a WP8_Plugins.zip in the \Assets\Best HTTP (Pro)\ folder. It contains a Readme.txt with the instructions.
     
  10. jhnissin

    jhnissin

    Joined:
    Sep 7, 2015
    Posts:
    27
    @BestHTTP

    I am having a problems with the SignalR connections using Best HTTP Pro. I am trying to simply form a connection to a server and close the connection afterwards and if the connection is not formed within a given time (5 seconds at the moment) I am calling close() for the connection. Everything is fine within a single editor run but if I exit the play mode and enter the play mode again, Unity completely hangs (I have to force quit it). I managed to pull out the following from the error logs, but don't know what exactly to make of it, do you have any suggestions?

    Reloading assemblies for play mode.
    Begin MonoManager ReloadAssembly
    Err [WebSocketTransport]: WSocket_OnError Request Finished with Error! Exception: Read failure at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    at System.IO.Stream.ReadByte () [0x00007] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Stream.cs:168
    at BestHTTP.WebSocket.Frames.WebSocketFrameReader.Read (System.IO.Stream stream) [0x00000] in /Users/jnis/Documents/code/work/nextgames/ConnectionTestClient/Assets/Plugins/Best HTTP (Pro)/BestHTTP/WebSocket/Frames/WebSocketFrameReader.cs:55
    at BestHTTP.WebSocket.WebSocketResponse.ReceiveThreadFunc (System.Object param) [0x0000b] in /Users/jnis/Documents/code/work/nextgames/ConnectionTestClient/Assets/Plugins/Best HTTP (Pro)/BestHTTP/WebSocket/WebSocketResponse.cs:238
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:LogError(Object)
    BestHTTP.Logger.DefaultLogger:Error(String, String) (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/Logger/DefaultLogger.cs:76)
    BestHTTP.SignalR.Transports.WebSocketTransport:WSocket_OnError(WebSocket, String) (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/SignalR/Transports/WebSocketTransport.cs:159)
    BestHTTP.WebSocket.WebSocket:OnInternalRequestCallback(HTTPRequest, HTTPResponse) (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/WebSocket/WebSocket.cs:226)
    BestHTTP.HTTPRequest:CallCallback() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPRequest.cs:1155)
    BestHTTP.HTTPConnection:HandleCallback() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPConnection.cs:795)
    BestHTTP.HTTPManager:OnUpdate() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPManager.cs:587)
    BestHTTP.HTTPManager:OnQuit() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPManager.cs:689)
    BestHTTP.HTTPUpdateDelegator:OnDisable() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPUpdateDelegator.cs:83)

    (Filename: Assets/Plugins/Best HTTP (Pro)/BestHTTP/Logger/DefaultLogger.cs Line: 76)

    Err [WebSocketTransport]: WSocket_OnError Request Finished with Error! Exception: Read failure at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    at System.IO.Stream.ReadByte () [0x00007] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Stream.cs:168
    at BestHTTP.WebSocket.Frames.WebSocketFrameReader.Read (System.IO.Stream stream) [0x00000] in /Users/jnis/Documents/code/work/nextgames/ConnectionTestClient/Assets/Plugins/Best HTTP (Pro)/BestHTTP/WebSocket/Frames/WebSocketFrameReader.cs:55
    at BestHTTP.WebSocket.WebSocketResponse.ReceiveThreadFunc (System.Object param) [0x0000b] in /Users/jnis/Documents/code/work/nextgames/ConnectionTestClient/Assets/Plugins/Best HTTP (Pro)/BestHTTP/WebSocket/WebSocketResponse.cs:238
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:LogError(Object)
    BestHTTP.Logger.DefaultLogger:Error(String, String) (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/Logger/DefaultLogger.cs:76)
    BestHTTP.SignalR.Transports.WebSocketTransport:WSocket_OnError(WebSocket, String) (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/SignalR/Transports/WebSocketTransport.cs:159)
    BestHTTP.WebSocket.WebSocket:OnInternalRequestCallback(HTTPRequest, HTTPResponse) (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/WebSocket/WebSocket.cs:226)
    BestHTTP.HTTPRequest:CallCallback() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPRequest.cs:1155)
    BestHTTP.HTTPConnection:HandleCallback() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPConnection.cs:795)
    BestHTTP.HTTPManager:OnUpdate() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPManager.cs:587)
    BestHTTP.HTTPManager:OnQuit() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPManager.cs:689)
    BestHTTP.HTTPUpdateDelegator:OnDisable() (at Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPUpdateDelegator.cs:83)

    (Filename: Assets/Plugins/Best HTTP (Pro)/BestHTTP/Logger/DefaultLogger.cs Line: 76)


    Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
    at BestHTTP.HTTPConnection.ThreadFunc (System.Object param) [0x00601] in /Users/jnis/Documents/code/work/nextgames/ConnectionTestClient/Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPConnection.cs:438

    Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
    at BestHTTP.HTTPConnection.ThreadFunc (System.Object param) [0x00601] in /Users/jnis/Documents/code/work/nextgames/ConnectionTestClient/Assets/Plugins/Best HTTP (Pro)/BestHTTP/HTTPConnection.cs:438
     
  11. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @jhnissin What version of Unity are you using? These errors known and normal, but i can't reproduce Unity hanging.
     
  12. jhnissin

    jhnissin

    Joined:
    Sep 7, 2015
    Posts:
    27
    @BestHTTP

    Firstly, awesomely swift response, thanks! Unfortunately because of the nature of the project I have to use the specific version 4.7.3 of Unity. Is there anyway to get around the problem?
     
  13. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @jhnissin Found only Unity 4.6.8 on the download page.
    I will try to find out something.
     
  14. jhnissin

    jhnissin

    Joined:
    Sep 7, 2015
    Posts:
    27
  15. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @jhnissin Sent you a download link in private. I wasn't able to reproduce your issue, but made some improvements.
     
  16. darrelcusey

    darrelcusey

    Joined:
    Nov 16, 2009
    Posts:
    5
    @BestHTTP

    I'm trying to parse through a relatively simple JSON object using the default JSON class included with BestHTTP. The only way I've been able to figure out how to do this is to Decode the List, then Encode the object (to string), then Decode that string to get the Dictionary, etc...

    Is there an easier/better way to do this all with decoding without re-encoding?


    ...sample JSON (it's very flat like this, but there are dozens of attributes):

    [{"id":1234,"name":"john"},{"id":5678,"name":"mary"}]

    ...here's the code I came up with:


    privateList<object> friendList = newList<object> ();
    privateDictionary<string, object> friendDict = newDictionary<string, object> ();
    ...

    if (request.error != null) {
    Debug.Log ("request error: " + request.error);
    } else {
    Debug.Log ("request success");
    friendList = (List<object>)Json.Decode (request.text);
    foreach (object friend in friendList) {
    string friendString = Json.Encode (friend); // trying to avoid re-encoding like this :/
    friendDict = (Dictionary<string, object>)Json.Decode (friendString);
    foreach (KeyValuePair<string, object> friendValue in friendDict) {
    Debug.Log (friendValue.Key);
    }
    }
    }
     
  17. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @darrelcusey Your best option is to use LitJson, this is bundled with the plugin too:
    Code (CSharp):
    1. class Friend
    2. {
    3.     public int id;
    4.     public string name;
    5. }
    6.  
    7.  
    8. string json = @"[{ ""id"":1234,""name"":""john""},{ ""id"":5678,""name"":""mary""}]";
    9.  
    10. LitJson.JsonReader reader = new LitJson.JsonReader(/*json*/ request.text);
    11. List<Friend> friends = LitJson.JsonMapper.ToObject<List<Friend>>(reader);
    12.  
    13. Debug.Log(friends.Count);
     
  18. wonharyu_gt

    wonharyu_gt

    Joined:
    Sep 17, 2015
    Posts:
    2
    Hi @BestHTTP,

    We'd like to file a bug regarding cpu hogging of WebSocket implementation. We've been using the library to implement socket.io-based communication, but frequently the app started to consume cpu as much as it can. FWIW, we're targeting for android (though we believe that this bug affects other platforms as well).

    We have found out that this issue can be reproduced by having an environment which will disconnect the underlying tcp connection when the app is in the background. That being said, any socket.io server configured with timeouts for connections(i.e. pingTimeout) will be enough to reproduce the bug. When the connection is established between the app and the server, one can just send the app background. After the timeout, the tcp connection will be dropped, and at the same time one of the threads will become a hogger. Even worse, the number of hogging threads will increase as one switches the app back and forth. A quick strace revealed that the thread is continuously calling recvfrom() syscall to a socket which is closed.

    As the impact of this issue is huge in our project, we have implemented a fix by ourselves, but still we're looking for the official bugfix. In general, our fix involves the class WebSocketFrameReader. As it does not take read failures into account, ReadByte() calls will return -1, stream reads will never succeed, and it falls into the infinite loop.

    Please let us know if you need further information.

    Best,
    Wonha
     
  19. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @wonharyu_gt

    Hi Wonha.

    Thank you for the detailed report. Your fix seems legit, I added them too. Also checked other usages and made modifications where it was appropriate.
    The next update will contain these fixes.
     
  20. wonharyu_gt

    wonharyu_gt

    Joined:
    Sep 17, 2015
    Posts:
    2
    Cool, thanks! :)
     
  21. dina_bravo

    dina_bravo

    Joined:
    Nov 14, 2013
    Posts:
    2
    Hi @BestHTTP,

    I have a problem that I can't figure out for a while now so any kind of help would be appreciated.

    I send a request and sometimes as a response I get the HTTPError and the response itself is null.
    When I print out the request.exception it says "System.IndexOutOfRangeException: Array index is out of range."
    Now this is because in HTTPResponse class in Receive() function the versionString is empty (the string that should be 'HTTP/1.1'fromthe"HTTP/1.1 {StatusCode} {Message}")

    So the exception happens in these lines
    Code (CSharp):
    1.  
    2. string[] versions = versionStr.Split(newchar[] { '/', '.' });
    3. this.VersionMajor = int.Parse(versions[1]);
    4. this.VersionMinor = int.Parse(versions[2]);
    5.  
    If I send the same request immediately after this exception, it all goes well. And like I said, sometimes it fails for the first time so I guess nothing is wrong with my request.

    Do you have any idea why this would happen?

    Thanks
     
  22. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @dina_bravo

    This error usually occurs when
    1.) The server closed the tcp channel but the plugin tried to receive a response on it. Without going into detail(you can search the previous pages for details), you can lower the MaxConnectionIdleTime (the default is 30 sec, you can try different values):
    Code (CSharp):
    1.  
    2. BestHTTP.HTTPManager.MaxConnectionIdleTime = TimeSpan.FromSeconds(15);
    2.) Sometimes, when the default SSL handler can't decode the secure stream it will result in an error like this. In this case you can use the alternate SSL handler:
    Code (CSharp):
    1. BestHTTP.HTTPManager.UseAlternateSSLDefaultValue = true;
     
  23. dina_bravo

    dina_bravo

    Joined:
    Nov 14, 2013
    Posts:
    2
    Changing the MaxConnectionIdleTime did the trick!

    Thanks!
     
  24. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    284
    I have a question:

    When I am downloading a big file (using the code bellow), if I lose my connection after the download already is in progress and the connection never go back again, the BestHTTP will continue waiting forever and I have no callback to abort the download and print a message to the user know his internet is offline.

    There are any tip to work around this situation?

    Code (CSharp):
    1.    private void DownloadFile(string url, string localPath)
    2.     {
    3.         HTTPRequest request = new HTTPRequest(new Uri(url), (req, resp) =>
    4.         {
    5.             if (resp == null)
    6.             {
    7.                 Debug.LogError("Download Failed!");
    8.             }
    9.             else
    10.             {
    11.                 List<byte[]> fragments = resp.GetStreamedFragments();
    12.  
    13.                 if (fragments != null)
    14.                 {
    15.                     // Write out the downloaded data to a file:
    16.                     using (FileStream fs = new FileStream(localPath, FileMode.Append))
    17.                     {
    18.                         foreach (byte[] data in fragments)
    19.                         {
    20.                             fs.Write(data, 0, data.Length);
    21.                         }
    22.                     }
    23.                 }
    24.  
    25.                 if (resp.IsStreamingFinished)
    26.                 {
    27.                     Debug.Log("Download Finished!");
    28.                 }
    29.             }
    30.         });
    31.  
    32.         request.OnProgress += (HTTPRequest req, int downloaded, int length) =>
    33.         {
    34.             float progressPercent = (downloaded / (float)length) * 100.0f;
    35.             Debug.Log(progressPercent.ToString("F0") + "%");
    36.         };
    37.  
    38.         request.UseStreaming = true; // Save to file
    39.         request.StreamFragmentSize = 1 * 1024 * 1024; // 1 megabyte
    40.         request.DisableCache = true; // already saving to a file, so turn off caching
    41.         request.Send();
    42.     }
     
  25. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @sandolkakos

    The plugin itself doesn't wait for the connection to come back.When if fails to read from the tcp stream, it will set the request State to Error, and will call the callback(and the HTTPResponse object should be null). This is the expected operation. What platform you experienced this problem?
     
  26. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    284
    Thanks for replying.

    I'm get this in Unity Editor for Windows (x64).
    I'm trying to eliminate the possibilities of the app crash or freeze due internet connection error (or lost).

    I did this steps:
    1. Begin to download a big file (between 200mb)

    2. During the download, turn off the internet connection

    3. At this point, when I Debug the HTTPManager.OnUpdate():
    - the HTTPConnection.State is still equals to "HTTPConnectionStates.Processing"
    - the conn.CurrentRequest.Response.HasStreamedFragments() is always equals to "false"
    - Because of this, the conn.HandleCallback() is never executed.

    @Edit
    PS.: If I turn on the internet connection, the Download will continue. But when the download complete, some times the file is corrupted.
     
    Last edited: Oct 2, 2015
  27. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @sandolkakos I tried to reproduce it in an editor on windows(x64) too. How you turned down the internet connection? Disabled the adapter, pulled out the cable, or an other way?
     
    sandolkakos likes this.
  28. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    284
    The way I am testing is by disconnecting the Wi-Fi of Windows, like this:

    disconnect_wi-fi.png

    But when you asked me, I did a new test:
    1. Disabled the Network Adapter in Windows
    2. the BestHTTP returned with HTTPResponse equals to "null" how the expected operation.
     
  29. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @sandolkakos Thanks for the additional information, i will need some time to investigate this issue.
     
    sandolkakos likes this.
  30. malek256

    malek256

    Joined:
    Dec 28, 2013
    Posts:
    27
    Seems to be crashing on iOS 9.2 in CFHTTPCookieStorage singleton, NSHTTPCookieStorage singleton
     
  31. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @malek256 That would be strange, because my plugin doesn't have classes named like these(CFHTTPCookieStorage and NSHTTPCookieStorage). These are native classes, and my plugin doesn't use them either.
     
  32. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    Code (CSharp):
    1. Assets/Plugins/Best HTTP (Pro)/BestHTTP/SecureProtocol/crypto/signers/RsaDigestSigner.cs(43,33): warning CS0436: The type `Org.BouncyCastle.Asn1.Nist.NistObjectIdentifiers' conflicts with the imported type `Org.BouncyCastle.Asn1.Nist.NistObjectIdentifiers'. Ignoring the imported type definition
    2.  
    I'm getting hundreds of these warnings - any idea how to silence those? Unity 5.2.1p2.
     
  33. malek256

    malek256

    Joined:
    Dec 28, 2013
    Posts:
    27
    Thank you for the information, it is indeed odd. I have it as a crash dump from Apple and walked the trace back. I will continue investigating and advise.
     
  34. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @fantastisch_ They are present when you upgrade from v1.8.x(or older) to the v1.9.x line and a TcpClientImplementation.dll remained in one of the /Assets/Plugins/ folder.
     
  35. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    Excellent, thanks again for a quick reply.
     
  36. Dynamoid-Megan

    Dynamoid-Megan

    Joined:
    Apr 16, 2015
    Posts:
    72
    I just wanted to update that clearing cookies when logging in helped solve the issue with domain names not being reachable sometimes!
     
  37. AwDogsGo2Heaven

    AwDogsGo2Heaven

    Joined:
    Jan 17, 2014
    Posts:
    102
    EDIT: Actually never mind, after further testing, I found out this is some odd issue with callbacks and ios. If the callback parameters are never accessed before a function is called it appears they are lost in iOS. A debug.log fixed it, though hopefully I'll find a better solution.

    Hello, I have purchased Best HTTP basic, and on iOS I'm having an issue. All my requests return with the response variable null! It throws this exception in xCode. I'm using Unity 5.2, and downloaded from the Asset store, thanks:
    Ex [HTTPRequest]: CallCallback - Message: A null value was found where an object instance was required. StackTrace: at RequestService+<ApiPut>c__AnonStorey4E..ctor () [0x00000] in <filename unknown>:0

    at BestHTTP.HTTPRequest.CallCallback () [0x00000] in <filename unknown>:0

    at BestHTTP.ConnectionBase.HandleCallback () [0x00000] in <filename unknown>:0

    at BestHTTP.HTTPManager.OnUpdate () [0x00000] in <filename unknown>:0

    NOTE: In editor everything works fine!
     
    Last edited: Oct 6, 2015
  38. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @AwDogsGo2Heaven Hmm, thats really odd. What Scripting Backend are you using? Mono2.x or IL2CPP?
     
  39. AwDogsGo2Heaven

    AwDogsGo2Heaven

    Joined:
    Jan 17, 2014
    Posts:
    102
  40. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @AwDogsGo2Heaven That's not a normal behavior. Can you share how your callback looked like when this error happened? If i can reproduce it, I will fill a bugreport to unity.
     
  41. AwDogsGo2Heaven

    AwDogsGo2Heaven

    Joined:
    Jan 17, 2014
    Posts:
    102
    varhttp = newHTTPRequest(newUri(url), HTTPMethods.Put, (request, response) => ProcessRequest(request, response, callback));

    This is what I'm doing that causes the crash in iOS. I have to do it this way because the callback variable is a delegate being passed in through the function. (note any of the HTTP methods would cause this, I don't think the HTTP module is at fault here. I was able to fix this simply Debug.Log the request and response before calling "ProcessRequest"
     
  42. richardbrammer

    richardbrammer

    Joined:
    Mar 1, 2015
    Posts:
    1
    the standard WWW object of Unity can't read the body of a 4xx response in a compiled Android APK. Is it possible to read the body of 4xx responses (e.g. 400 BAD REQUEST) with Best HTTP?

    Thanks in advance,
    Richard
     
  43. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @richardbrammer From the plugin's viewpoint it's the same as other responses with other status codes. It will read all the headers and body, and you can access it as usual.

    In my samples i use it too:
    Code (CSharp):
    1.     void ImageDownloaded(HTTPRequest req, HTTPResponse resp)
    2.     {
    3.         switch (req.State)
    4.         {
    5.             // The request finished without any problem.
    6.             case HTTPRequestStates.Finished:
    7.                 if (resp.IsSuccess)
    8.                 {
    9.  
    10.                     // Load the texture
    11.                     tex.LoadImage(resp.Data);
    12.  
    13.                 }
    14.                 else
    15.                 {
    16.                     Debug.LogWarning(string.Format("Request finished Successfully, but the server sent an error. Status Code: {0}-{1} Message: {2}",
    17.                                                     resp.StatusCode,
    18.                                                     resp.Message,
    19.                                                     resp.DataAsText));
    20.                 }
    21.                 break;
    22.         }
    23.     }
    As you can see, when the request Finished, i check the status code of the response for success (IsSuccess is just a shortcut for (StatusCode >= 200 && StatusCode < 300) || StatusCode == 304). If it's not considered as a successful request log out the StatusCode (like the mentioned 400), the Message (like "BAD REQUEST") and the body of the response.
     
  44. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @sandolkakos I was able to reproduce this issue and i think i found a good solution for it. Sent a download link for the new version of the package in a private message.
     
    sandolkakos likes this.
  45. MadByteLabs

    MadByteLabs

    Joined:
    May 29, 2011
    Posts:
    18
    Hi, i can add route in websocket request ?
     
  46. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @Lestar Yes, the request uri can contain all the regular paths and queries:
    Code (CSharp):
    1. new WebSocket(new Uri(string.Format("ws://localhost:40476/path/to/resource/connect?query=param")));
     
  47. h_kishi

    h_kishi

    Joined:
    Jun 9, 2015
    Posts:
    5
    @BestHTTP

    Does socket.io client support "transports" option?
    The following is JS socket.io-client example to use only websocket transport:
    Code (JavaScript):
    1.  
    2. var socket = io.connect({
    3.   transports: [ 'websocket' ]
    4. });
    5.  
    And one more thing, when the socket.io server enabled only websocket transport, it seems that the client fails to connect the server.
    Is the above Intended behavior?
     
  48. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @h_kishi There are no 'forced' transport selection in the plugin. It will try to connect first with WebSocket, then Server-Sent Events, and finally it will fall back to long polling.
    can you share what error you receives? Also a more detailed logging can be helpful to find out what's the problem:

    Code (CSharp):
    1. HTTPManager.Logger.Level = BestHTTP.Logger.Loglevels.All;
     
  49. h_kishi

    h_kishi

    Joined:
    Jun 9, 2015
    Posts:
    5
    I confirmed the behavior of the original socket.io-client. In the case of server supported only websocket transport, the client failed too. So, BestHTTP's behavior is the same as original one.
    It is no problem.

    Do you have a plan to support 'forced' transport option in the plugin?
    In the case of clustering server process, the option is useful on occursion.
     
    Last edited: Oct 14, 2015
  50. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @h_kishi Added it mo my TODO list.
    For a quick solution you can modify the SocketManager.cs' CreateTransports() function to create only the transport you like better.