public static void Request(string url, WWWForm form, byte[] byteData, Hashtable headers, System.Action <string> callback, System.Action <string, System.Action, System.Action> error_callback) { GameObject obj = new GameObject("HTTPLoader"); HTTPLoader loader = obj.AddComponent <HTTPLoader>(); loader.m_eState = STATE.START; loader.StartCoroutine(loader.request(url, form, byteData, headers, callback, error_callback)); }
/// <summary> /// Gos the WWW. /// </summary> /// <returns>The WW.</returns> /// <param name="url">URL.</param> /// <param name="form">Form.</param> /// <param name="error_callback">Error_callback.</param> /// <param name="callback2">Callback2.</param> internal static void GoWWW <T>( string url, WWWForm form, byte[] byteData, Hashtable headers, System.Action <string, System.Action, System.Action> error_callback, System.Action <T> callback2 ) where T : HTTPPacketAck { GameObject obj = new GameObject("HTTPLoader"); HTTPLoader loader = obj.AddComponent <HTTPLoader>(); loader.m_eState = STATE.START; loader.StartCoroutine(loader.StartHTTP <T>(url, form, byteData, headers, error_callback, callback2)); }
/// <summary> /// Sends the Bytes Data. /// </summary> /// <param name="packet">Packet.</param> /// <param name="callback">Callback.</param> /// <param name="headers">Headers.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public void SendBYTE <T>(HTTPPacketRequest packet, System.Action <T> callback = null, IHttpSession.PROCESS_HANDLE process = null) where T : HTTPPacketAck { HTTPLoader.GoWWW <T>(this.m_strURL + packet.GetAction(), null, packet.ToMsgPacketByte(), this.m_cHeader, onDataError, callback); }