Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Communication JQuery and C#

I'm trying to connect Chrome extension and my C# application.

I'm using this code https://stackoverflow.com/a/13953481/3828636

Everything is almost working there in only one problem I can send message only 6 times and than my c# app doesn't recieve anything. When I re-open my extension ( click on icon ) it works and c# app recieve messages but still only 6 times.

What could be a problem?

I tried to send it like this:

function send(data){
    var data = new FormData();
    var xhr = new XMLHttpRequest();
    xhr.open('POST', listener, true);
    xhr.onload = function () {
};
xhr.send(data);
}

There is some limit of sending messages by port? or what?

Thanks for help!

EDIT !!

I have already made it. The problem was my C# application it was receiving messages but it wasn't responsing.

It was like

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

BLOCKED ( because to many sends without response )

but it should be like:

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

like image 640
Icet Avatar asked Jul 10 '15 09:07

Icet


1 Answers

I have already made it. The problem was my C# application it was receiving messages but it wasn't responsing.

It was like

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

CHROME ( SEND ) -> C#

BLOCKED ( because to many sends without response )

but it should be like:

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

CHROME ( SEND ) -> C#

C# ( RESPONSE ) -> CHROME

like image 137
Icet Avatar answered Sep 30 '22 09:09

Icet