Disconnect/close/cancel from the client side
See original GitHub issueHi, I can’t find any method to disconnect the client as per my command. Using an example snippet here -
function doSomething () {
var SomeServiceClient = xxx.yyy_service.SomeServiceClient;
var client = new SomeServiceClient('http://localhost:8080', null, null);
status = client.testme(parameters, {},function (err, response) {
console.log('testme response: ' + response);
});
// how do i disconnect the client?
}
The problem I’m encountering is - user clicks a button, I make a request to the gRPC server and start receiving data in a stream. If the user clicks again, I start receiving data again in another stream. I want to disconnect any previous streams/connections so that I can receive only one stream at a time. Any help/suggestions would be greatly appreciated! (I know I could disable the click till the stream is finished, but that’s not what I’m looking for.)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
how to know at server side on disabling connection on client ...
hi, i developed a video conferencing tool. In this tool at server side i maintain the incoming clients as a thread.
Read more >CWE-603: Use of Client-Side Authentication
A client/server product performs authentication within client code but not in server code, allowing server-side authentication to be bypassed via a modified ...
Read more >Client-side encryption, developer productivity, & more!
Here to bring you the latest news in the Cloud is Kelci Mensah. • Meet Climate Insights → https://goo.gle/3I9WSw0• Improve Developer ...
Read more >Client-side coding: How to prevent malicious use?
Any attempt to protect secure resources client-side is doomed because it violates several of the immutable laws of security. #2/3 - if your...
Read more >Client side vs Server side: Everything you need to know - Lytics
Understanding client-side and server-side scripting is essential to build your website for customers' needs. Learn everything you need to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
How do you cancel a request when using the promise client? as the client.request only returns a promise?
In your snippet above, you can call
status.cancel()
.