Is it possible to create an app that provides a REST API and a TCP/IP socket connection interface. I'm new to web related programming but I do have a REST API demo program working and I have created socket servers in the past. I need to create an app that can receive messages via a REST API and forward the message to a machine that is connected via the socket connection. I am working in C# with Visual Studio 2022.
Thank you.
Related
I am using nghttp2 C++ library (version 1.30) to implement a web server using nghttp2::asio_http2::server. In the deployment many HTTP client connects to the sever and invokes several REST API over time before diconnect. The nghttp2 C++ library provides on_connect which helps to know when the connection is established in the client application.
Is there any simialr way to execute any call back or get notification in the server when the client connects? It is required to get the notification before the REST API is invoked. For example if a client connects and invokes two REST API, the server should be notified once. If I provided handler to server.handle, thats get invoked for each REST API call.
Notification/callback in server code
I want to use web sockets because I need to notify my users when there is a new message for them. And I’ve done a lot of research and I’m pretty sure I need to use WebSockets for this problem.
I was able to connect to my backend with the following steps: https://www. playframework.com/documentation/2.2.x/ScalaWebSockets
This allows my frontend to connect to my backend and has received the answer from the backend.
But how is it possible to manage all currently active web socket connections? Is there a method that I can use to find all active connections? Or do I have to implement all this from scratch?
Server LogSpring Web Socket Config
I developed Chat application and deployed in linux server and I have Deskrom Desk Support application to send chat messages, Chat Server is started with out any error. I am using Web Sockets Stomp protocol.
After I sent message from Desk application the messages are saving in Chat application but in the middle I am getting the above attached Broken Pipe exception.
Please help me to fix the problem.
I have a chat app having web service installed on tomcat server, ejabberd as XMPP server. Right now i am using strophe.js on client side to directly communicate with ejabberd server for chatting purpose.
Is this correct chat app design ? or shall I send chat through tomcat server so that xmpp server is not accessible directly from client side ? Can anyon suggest a better design ?
You should connect your clients directly to ejabberd (or through a proxy like NGinx). ejabberd is designed to receive lot of traffic directly and using Tomcat as proxy will not be scalable and is not recommended.
I want to use UCMA 3.0 (standalone, without Lync) to create an IVR application as modeled in the SDK docs:
http://msdn.microsoft.com/en-us/library/gg448007.aspx
I'd like a code snippet that demonstrates how to create the endpoint to a SIP PSTN Gateway so people can dial in from a regular phone and the app will pick up. I have the user name, password, and domain from the SIP provider. I could not find in any of the samples an actual code example of the model described in the link above.
Actually, the Visual Studio template included with UCMA already handles this (albeit in an ultra confusing way). If you create a new project and hit F5 it will start a standalone application listening on port 5060.
What it doesn't handle is SIP registration. For that you'll need to put a proxy server between your app and your provider. Check out http://www.brekeke.com/sip/, they offer a low-cost SIP server that can register against your SIP provider.