I'm trying to receive a message in Unity from a client connected. However, I do not find a way to create a server in Unity that accepts an external client (an iOS app) and reads messages. Any help?
Thanks!
Using socket with unity is a bit complicated and tricky but it is possible. I answered this question few days ago and see no need to re-post the code here. Here is a complete working Unity socket server code.
Unity3d C# plugin to act as a socket server
Related
i am creating an app for internet calling using VoIP . But have no idea how to send SIP registration to sever to stabilise connection between to devices .
and any suggestions for the library
You can use Linphone library for that purpose. Although be prepared that documentation is not ideal and you will need to figure some of the things by yourself. You however can inspire by this tutorial project
I have a web application (hobby project) with a chat function that is implemented with Express.js and socket.io.
Everything works fine on PC and on Android phones, but as soon as you connect with an Apple device, there will be problems since it seems that no websocket connection can be established between the server and the Apple device.
After a bit of googling I found this page:
https://socket.io/docs/v4/troubleshooting-connection-issues/?fbclid=IwAR2XeuehqJkkgFoshFKSVN7sz4UUfWkZ0CPYmsWnqXm-0Q17iVC3dRDyEEI#problem-the-socket-is-stuck-in-http-long-polling
I have limited abilities to troubleshoot on the client side since we do not have a Mac but I followed the troubleshooting that they recommend for the server side. When you connect with an Apple device, it seems that the event "upgrade" is never triggered and you therefore have to settle with HTTP Polling instead of web socket, which does not provide a good user experience.
I have got a certificate from Lets Encrypt and am using HTTPS to access the webpage. I have also tried with several different browsers on the Apple devices.
Anyone have an idea why you can not create a web socket connection with Apple devices and what you could do about it?
Feeling a bit lost and would love some help!
I have implemented Chat based application. I can able to do many functionality with https://github.com/robbiehanson/XMPPFramework library. It is very good library. But after some days my server side guys included bash services in server. My server side guys implementing xmpp using Strophe.js. And they are using following code to enable BOSH service while connecting.
BOSH_SERVICE = "http://host.com:5280/http-bind";
new Strophe.Connection(BOSH_SERVICE);
Now they told me enable BASH service in IOS side also. Now I can not connect to that server.
How to include BOSH service in robbiehanson xmpp IOS library (https://github.com/robbiehanson/XMPPFramework)?
The iOS xmppFramework does not currently offer support for BOSH. Here's a confirmation:
https://github.com/robbiehanson/XMPPFramework/issues/6#issuecomment-54085037
But, your iOS client can still login to the server via the socket connection and your web client can use BOSH. That's your alternative and it should work well.
If you really want to create your own iOS BOSH implementation, look into XMPPTransports as a starting point.
Happy coding :)
A web application acts as a backend to process request coming from the iPhone. To send messages to iPhone from web application while processing a request(e.g., for payment), I want to send messages to iPhone when something interesting happens on the server or else if everything is successful, sending them transaction details. Which one is better to use PushSharp or SignalR? Does they both serve the same purpose? Either way, enlighten me on this topic. Its confusing to me.
SignalR is a great way to send real time information to a web client, essentially having server-side code push information to the client and call client-side code (i.e. javascript) in realtime.
PushSharp is a great way to send push notifications to native mobile apps. For iOS, this means using Apple's infrastructure. It also means that the message will be shown as a notification in the iPhone and not just inside the browser.
Essentially, if the iPhone request you mention is coming from a native app, try PushSharp. If it's a web app running in a browser, use SignalR.
PushSharp appears to leverage the native messaging for each platform. Azure Notification Hubs provide native messaging similar to what PushSharp appears to do. The native messaging platforms scale out very well, but do not give you direct access between client/server code, and messages can be delayed in some cases up to minutes. Messaging like this works really well when you want to send messages to millions of devices. Example: all users who want an alert when their favorite sports team wins a game - not time sensitive to the minute.
If you want your push message to be strictly between your server-side code and your client-side code, SignalR can achieve that. SignalR also has a .Net implementation, so it isn't just for javascript/web pages. SignalR is will leverage approaches like web sockets / long polling / etc. If you are sending a response to tell your client that a query has finished, or that a message was received, and it doesn't help to have that message arrive minutes later... SignalR may be a better approach.
i have been working on developing an blackberry application. as per now i want the application to connect to a local server on my network and fetch a file from that machine. i have been using the library given by a named blackberry developer Mr.peter strange....here is the link for the same Http connection through BIS-B
my requirement would be setting up connection to the local server using any transport mode but it should be able to render the text downloaded.
i tried using the demos provided by blackberry samples as it comes with the plugin for eclipse the http demo from those samples shows only trying to setup an http connection string and the networkapidemo sample shows diffrent http codes when the url is entered as desired.i am running all the applications on the simulator. i havent tried running any of my apps on the hardware
may i know why this problem arises of http codes....ill also want to know guidelines about how to set a simple http connection just to download a file(text file) from a local server.
I have tried many forums too. if anybody would have a look at it i would post it here.
Only a simple connection is becoming a headache!
anyways...waiting for replies..
thanx in advance guys :)
It does not matter whether you want to communicate with local or remote server.
1) See the API docs on HttpConnection. There are sample code in there.
2) Unfortunatelly, on BB you should be aware of Network Transports. Check this thread to get all info you need on Network Transports.
UPDATE:
The second point explains an approach that will work on any OS. If you need an OS 5+ only approach, then check the ConnectionFactory API. ConnectionFactory usage sapmles.