# Problem in InterprocessConnection

**URL:** https://forum.juce.com/t/problem-in-interprocessconnection/12937
**Category:** Windows
**Created:** [June 2, 2014, 8:03am UTC](https://forum.juce.com/t/problem-in-interprocessconnection/12937 "2014-06-02T08:03:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Gotze\_Wong](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Gotze\_Wong](https://forum.juce.com/u/Gotze_Wong)
#### Post date: [June 2, 2014, 8:03am UTC](https://forum.juce.com/t/problem-in-interprocessconnection/12937/1 "2014-06-02T08:03:56Z")

</div>

Jules or someone awesome, please&nbsp;help me if you are convenience,&nbsp;or not. :P

I wanna build &nbsp;a Socket plugin based on JuceBrowserPluginDemo.

here is my code:

```
class JuceDemoBrowserPlugin : public BrowserPluginComponent,
                               public Button::Listener,
                               public InterprocessConnection
{
public:
    JuceDemoBrowserPlugin()
        : textBox (String::empty),
          button ("Send a message to the webpage")
    {
        addAndMakeVisible (textBox);
        textBox.setMultiLine (true);
        textBox.setBounds (8, 8, 300, 300);
        addAndMakeVisible (button);
        button.setBounds (320, 8, 180, 22);
        button.addListener (this);
        button.setEnabled (false);
        ourJavascriptObject = new DemoBrowserObject (this);
        
        textBox.setText (SystemStats::getJUCEVersion() + "\n\n"
                          + "Browser: " + getBrowserVersion() + "\n");
        if(connectToSocket("61.160.108.238",1078,6000)) 
            textBox.setText (textBox.getText() + "Connection success.\n");
        else
            textBox.setText (textBox.getText() + "Connection fail.\n");
    }
    ...

  void connectionMade()
    {
        textBox.setText (textBox.getText() + "connectionMade...\n");
    }
    void connectionLost()
    { 
        textBox.setText (textBox.getText() + "connectionLost...\n");
    }
    void messageReceived (const MemoryBlock& message) 
    {
        textBox.setText (textBox.getText() + "messageReceived\n");
    }
```

Result from my IE

```
JUCE v3.0.5
Browser: Internet Explorer 
Connection success.
connectionMade...
```

**The question is why i can't get message from&nbsp;messageReceived() which is sent by server&nbsp;?&nbsp;I can see it(fe:aa:ff:04:00:c2:96:24:cd:00:00:00:00:46:bb:0d) from Wireshark.**

**To be short, messageReceived() doesn't work, why?**

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)
#### Post date: [June 2, 2014, 8:30am UTC](https://forum.juce.com/t/problem-in-interprocessconnection/12937/2 "2014-06-02T08:30:44Z")

</div>

What do you have running at the server end? You understand that there must be&nbsp;a juce app running an InterprocessConnection at both ends for it to work, right?

---

<div class="post-metadata">

### Author: ![Gotze\_Wong](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Gotze\_Wong](https://forum.juce.com/u/Gotze_Wong)
#### Post date: [June 2, 2014, 10:14am UTC](https://forum.juce.com/t/problem-in-interprocessconnection/12937/3 "2014-06-02T10:14:24Z")

</div>

That is why I screw it up&nbsp;.Server is not my part, and it is code by C#.&nbsp;&nbsp;In my case, &nbsp;Should&nbsp;I&nbsp;use SocketHelpers to communicate, right?&nbsp;Thanks for your help,&nbsp;jules !

---

<div class="post-metadata">

### Author: ![Gotze\_Wong](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Gotze\_Wong](https://forum.juce.com/u/Gotze_Wong)
#### Post date: [June 2, 2014, 1:19pm UTC](https://forum.juce.com/t/problem-in-interprocessconnection/12937/4 "2014-06-02T13:19:50Z")

</div>

I did it.&nbsp;StreamingSocket works. But Unlike&nbsp;InterprocessConnection, I must do the Thread program.&nbsp;Insatiable，sorry...&nbsp;
