This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CustomTLSClientSetup : MonoBehaviour | |
| { | |
| private void Start() | |
| { | |
| // 1. Add pinning only to selected host(s) | |
| var hostName = "my.server.com"; | |
| (HTTPManager.PerHostSettings.Get(hostName, false) ?? HTTPManager.PerHostSettings.AddDefault(hostName)) | |
| .TLSSettings.BouncyCastleSettings.TlsClientFactory = PinningTlsClientFactory; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Lib_BEST_HTTP_WebGL_WS_Bridge = | |
| { | |
| $ws: { | |
| webSocketInstances: {}, | |
| nextInstanceId : 1, | |
| halt: false, | |
| /*UTF8Decoder: new TextDecoder('utf8'),*/ | |
| Set : function(socket) { | |
| ws.webSocketInstances[ws.nextInstanceId] = socket; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if !BESTHTTP_DISABLE_SIGNALR_CORE | |
| using System.Threading; | |
| #if CSHARP_7_OR_LATER | |
| using System.Threading.Tasks; | |
| #endif | |
| using BestHTTP.Futures; | |
| using BestHTTP.SignalRCore.Authentication; | |
| using BestHTTP.SignalRCore.Messages; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if !BESTHTTP_DISABLE_SIGNALR_CORE | |
| using System.Threading; | |
| #if CSHARP_7_OR_LATER | |
| using System.Threading.Tasks; | |
| #endif | |
| using BestHTTP.Futures; | |
| using BestHTTP.SignalRCore.Authentication; | |
| using BestHTTP.SignalRCore.Messages; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if !BESTHTTP_DISABLE_SOCKETIO | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using BestHTTP.PlatformSupport.Memory; | |
| using BestHTTP.SocketIO3.Events; | |
| using Newtonsoft.Json; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BlockingRequestHelper blkRequest = new BlockingRequestHelper(); | |
| var request = new HTTPRequest(new Uri("https://httpbin.org"), (req, resp) => | |
| { | |
| switch (req.State) | |
| { | |
| // The request finished without any problem. | |
| case HTTPRequestStates.Finished: | |
| if (resp.IsSuccess) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Helper class to be able send a blocking HTTPRequest | |
| /// </summary> | |
| public sealed class BlockingRequestHelper | |
| { | |
| #region Private Fields | |
| /// <summary> | |
| /// AutResetEvent to wait for the request | |
| /// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using BestHTTP; | |
| using System.IO; | |
| public class LeaderboardTest : MonoBehaviour | |
| { | |
| const int count = 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UnityEngine; | |
| using System.Collections; | |
| using System.IO; | |
| using System.Collections.Generic; | |
| using BestHTTP; | |
| using BestHTTP.Caching; | |
| [RequireComponent(typeof(AudioSource))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| [RequireComponent(typeof(GUITexture))] | |
| public class LoadImageTestScript : MonoBehaviour { | |
| /// <summary> | |
| /// Default url that points to an image somewhere on the internet. | |
| /// </summary> | |
| public string ImageUrl = "http://1.bp.blogspot.com/_EmX0HOnldCg/TODtaqLAHeI/AAAAAAAABnM/fLPKmMD66ng/s1600/funnycat.jpg"; |
NewerOlder