Suppose there is a website wss://web.example.org/asset which send share price every second. This is working fine in postman
But i want to connect to this site from a online server and want to store data. Because postman is Installed on my computer and it can't online 24×7.
I am beginner and I don't know how to start and where to start
Related
I received Javascript code to connect to an external API via a Websocket. It connect via the "wss://" protocol.
new WebSocket('wss://' + wsUri + '/ws');
The connection is up and running on one of the pages on my WordPress site.
As I visit the page, it establishes the Websocket connection to fetch the data from the API and then it inserts the results into my database via PHP.
The problem is, I need this to work in the background, no matter if anyone visits the page or not.
Is there any way to keep the Websocket connection on going in the background and keep writing results into the database, as they come in?
Alternatively, I could be connecting to the Websocket at an interval (e.g. every minute) and fetch the results, then disconnect. And connect again after a minute.
What's the best way to go about it? Would a cron job work?
Currently I am working on one work in which one nginx server is acting as front-end server and other nginx server is connected to this front end server to serve it what user has requested. Now, I can visualize the activities of user from the access log of front end server, but meanwhile, I want to know how this front-end server is interacting with that back-end server?
Is there any way to see, for example, by seeing some sort of log or any other procedure?
Find where the second one stores its logs . access logs of back-end nginx is what the first one sends to it.
I have website which implements signalR. All works well in localhost.
But on testing server I can see it connects & server sent events but all messages are empty.
Any idea what could be the issue?
Attached 2 images from diff. environments.
Help needed please
What's is the best WebSocket client library for a .net 4.5 on windows web application hosted on windows 2008 servers to connect to a remote server web socket.
The scenario is: our web application will use a web socket to connect to a server WebSocket on a third party infrastructure. Our client WebSocket will connect and send some commands and read the responses where we can identify the information needed. So there is no interaction from the user or browser its just in the code. e.g. user clicks a button and we go and get some data, and give a message dependant on the response.
so for example our client will connect to the third party socket and pass the users car registration number and send a tell me the car details and the server socket will return the data like: make, model, year etc... so we can then display that to the user.
Has anyone used this library with some good success? http://www.nuget.org/packages/WebSocket4Net
I'm hoping someone here can provide the best approach for doing this with some tried and tested solutions. I have been thinking about a web API that handles all the socket stuff in our client so i can call it and let it handle the close connection etc.
i've been searching and trying for weeks now to find a solution to my issue that I can understand and easily implement but I had no joy. So i would be very grateful if someone could put me out of my misery.
I'm building an iphone app similar in functionality to apps like "Air Video" and "Air Playit". The app should communicate with a server running on a remote host. This server should be able to execute a command sent by the iphone to encode a video and stream it over http.
In my case, my iphone app sends commands to be executed on a remote host. the remote host is running a python socket server listening for example on port 3333.
On the iphone, i'm simply using
"CFStreamCreatePairWithSocketToHost", "CFWriteStreamOpen" and
"CFReadStreamOpen"
to connect, write and read data.
My remote host, successfully intercepts the commands and starts the encoding.
To serve the contents, I'm having to run a separate http server (i'm using Python simpleHTTPServer) which is listening on another port.
What I would like to do is use the same port for both system commands and http requests.
The apps I've mentioned above seem to do it that way and I've noticed they have their own build-in web server.
I'm sure I'm missing something but please bear with me this is my first attempt at building an app.
Encode your system commands into special HTTP requests. Decide which thing to do (execute command or serve the contents) based on HTTP request, not on the incoming port. If you need to use separate http servers (like you told), consider having a layer that receives everything from the devices and dispatches to other servers (or ports) based on the request.