So I’ve been using UniWeb recently, and they had an issue where all my requests were occurring twice for some reason even though I was definitely only calling it once. Any time I would do a POST through UniWeb, it would create two entries. However, if I used Unity’s WWW class, it would work properly. So it’s not an issue on our server end. Also the creator doesn’t appear to be responding to anything.
Does BestHTTP do something similar with sending multiple requests?
Hi,
I didn’t know any issue like this about my plugin, but I’m always here to help and fix any bug if there is any.
I appreciate the insanely quick reply. I will probably purchase this within the next few minutes just because of that, haha.
Thank you,
If you will find any issue, need help or you have some suggestion, don’t hesitate to drop me a mail.
Not sure if it’s stated anywhere, but what level of stripping am I allowed to use?
Didn’t checked the stripping levels yet, but i definitely will later today.
However Unity love to strip out the whole System.Security namespace so without a link.xml it should be a problem.
Hi KamiKaze425,
I was able to build run the demos with all stripping level without any additional work.
That’s fine. I already need System.Security for a cryptography thing, so I have that link.xml file. I was just making sure I could use all the stripping levels, and it appears to work fine.
I recommend putting that in your description, it would be a major selling point.
Thank you for the tip.
Hi Gundoglu!
Just wanted to let you know that I finished adding the WebSocket support to BestHTTP, currently writing the documentation.
I hope it will be out at the end of the week.
I just bought Best HTTP Pro from asset store minutes ago. But when it is imported into a blank project, I saw the error. I am using Mac Book with OS 10.9 and Unity 4.2.2f1 Pro. I try to adjust the build setting “Api Compatibility Level”, neither “.Net 2.0” nor “.Net 2.0 Subset” make the error disappear. And I have been restarted Unity each time I adjust the setting. Please help.
Hi apprenticegc,
You need to move the Plugins folder from the Best Http Pro folder to your Assets folder.
(This is becouse assets can be uploaded to the store only when they are in one folder. But unity loads plugins from the Assets/Plugins folder only. So this is a limitation of unity, but i hope you understand this, and I’m sorry for any inconvenience.)
Thanks, the problem is solved. Don’t notice the difference the location of “Plugins” folder matters. I usually put my DLLs anywhere in “Plugins” folder(s) and they do work fine. I guess there must be some rule to “Plugins”, “Editor” and “Resources” which I don’t quite understand. I will spend some time to research on this topic later. But anyway, thanks for replying me so quickly.
WebSocket support is live now in both Basic and Pro versions.
I am trying to use version 1.2 with unity 4.3.0f4 but importing the package from asset store causes a internal compiler error. I am importing it to an empty project. I have Unity pro/iOS pro /Android pro The exact error is
Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.TypeLoadException: Could not load type ‘SocketEx.TcpClient’ from assembly ‘TcpClientImplementation, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’.
at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type)
at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] in :0
at Mono.CSharp.MemberCache.AddMethods (BindingFlags bf, System.Type type) [0x00000] in :0
at Mono.CSharp.MemberCache.AddMethods (System.Type type) [0x00000] in :0
at Mono.CSharp.MemberCache…ctor (IMemberContainer container) [0x00000] in :0
at Mono.CSharp.TypeHandle…ctor (System.Type type) [0x00000] in :0
at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] in :0
at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] in :0
at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type t, MemberTypes mt, BindingFlags bf, System.String name, System.Boolean used_cache) [0x00000] in :0
at Mono.CSharp.TypeManager.RealMemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in :0
at Mono.CSharp.TypeManager.MemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in :0
at Mono.CSharp.Expression.MemberLookup (Mono.CSharp.CompilerContext ctx, System.Type container_type, System.Type qualifier_type, System.Type queried_type, System.String name, MemberTypes mt, BindingFlags bf, Location loc) [0x00000] in :0
at Mono.CSharp.Expression.MemberLookup (Mono.CSharp.CompilerContext ctx, System.Type container_type, System.Type queried_type, System.String name, MemberTypes mt, BindingFlags bf, Location loc) [0x00000] in :0
at Mono.CSharp.Binary.ResolveUserOperator (Mono.CSharp.ResolveContext ec, System.Type l, System.Type r) [0x00000] in :0
at Mono.CSharp.Binary.ResolveOperator (Mono.CSharp.ResolveContext ec) [0x00000] in :0
at Mono.CSharp.Binary.DoResolveCore (Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression left_orig, Mono.CSharp.Expression right_orig) [0x00000] in :0
at Mono.CSharp.Binary.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in :0
at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in :0
at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in :0
at Mono.CSharp.Binary.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in :0
at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in :0
at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in :0
at Mono.CSharp.Expression.ResolveBoolean (Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression e, Location loc) [0x00000] in :0
at Mono.CSharp.If.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0
at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0
at Mono.CSharp.TryCatch.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0
at Mono.CSharp.TryFinally.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0
at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0
at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0
at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0
at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0
at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent, Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md) [0x00000] in :0
Hi Ryuuguu,
You need to move the Plugins folder from the Best Http folder to your Assets folder.
This is because assets can be uploaded to the store only when they are in one folder. But unity loads plugins from the Assets/Plugins folder only. So this is a limitation of unity, but i hope you understand this, and I’m sorry for any inconvenience.
Thank you for quick reply. I even knew about this I just forgot when installing.
I’m trying to post to a https url, but whenever I do, I get a null response and the request has an exception.
Relevant code:
And the exception:
Any ideas on what might be causing this problem? I saw the documentation used https examples. I’m following it pretty closely, but I didn’t see anything in there that indicated I needed to do something special to send https requests.
Right now I’m just running from within the Unity Editor, but I plan to run it from iOS, Android, and hopefully WebPlayer.
Hi chirhotec.
Of course https is fully supported on all platforms.
In this case its looks like the server is sending wrong data or a non https stream.
On platforms that you listed the plugin uses mono’s own implementation so i think something should be wrong on server side, but if you send to me a “working” code sample that i can test, maybe i can figure out more about this problem.
(All private urls that i get i use them only for debugging and i delete them as soon as they are not needed any more, or i can reproduce the problem in an other way.)
I hope we will find out a solution quickly.
I’m having a bit of a problem getting the Websocket events hooked up with C#.
My Code looks like this:
private WebSocket ws;
public ConnectionManager () {
ws = new WebSocket(new System.Uri("http://localhost:8080"));
ws.OnOpen += this.OnWebSocketOpen;
ws.OnMessage += this.OnMessageReceived;
ws.Open();
}
private void OnWebSocketOpen(WebSocket webSocket) {
Debug.Log("I opened a web socket!");
}
private void OnMessageReceived(WebSocket webSocket, string message) {
Debug.Log("Message Recieved");
}
Neither the OnWebSocketOpen and OnMessageRecieved events are not being called. I can see the initial connection being sent to the server. I feel like I must have the delegates set up incorrectly, but I’m not sure why. Could someone point me in the right direction?