Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

How to Capture the Messages or data send from the server. #12

Open
Wathsara opened this issue Sep 24, 2019 · 0 comments
Open

How to Capture the Messages or data send from the server. #12

Wathsara opened this issue Sep 24, 2019 · 0 comments

Comments

@Wathsara
Copy link

Received message which is neither a response nor a notification message:
{
    "jsonrpc": "2.0",
    "id": "d287385e-8e56-4e98-a0ef-f96bc55aa2b6"
}

I get the output as follows but i need to get the message that received to a variable is there a way to do that. I used the below code to send.

               rpc.listen({
			webSocket,
			onConnection: (rpcConnection: rpc.MessageConnection) => {
				const notification = new rpc.NotificationType<string, string>('hell');
				rpcConnection.listen();
				rpcConnection.sendNotification(notification, 'hii');			
			},	
		});	
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant