# Small InterprocessConnection FR

**URL:** https://forum.juce.com/t/small-interprocessconnection-fr/2729
**Category:** General JUCE discussion
**Created:** [April 12, 2008, 12:15am UTC](https://forum.juce.com/t/small-interprocessconnection-fr/2729 "2008-04-12T00:15:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![valley](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@valley](https://forum.juce.com/u/valley)
#### Post date: [April 12, 2008, 12:15am UTC](https://forum.juce.com/t/small-interprocessconnection-fr/2729/1 "2008-04-12T00:15:56Z")

</div>

Jules,

I know this is somewhat stretching the domain of the InterprocessConnection class, but would it be possible to expose the ip address of the current connection?

It’d sometimes be useful to have the ability to access this data (if only to restrict the IPs[1] that can connect). As such, an addition to ICS would allow the createConnectionObject() virtual to selectively create ICs, or more generally to give the IC class a method like (untested, and not checked for typos):

```auto
const String InterprocessConnection::getHostName() const 
{
  if (pipe != 0) 
     return String("localhost");
  else if (socket != 0)
  {  
      if (socket->isLocal())
        return String("localhost");
      else
        return socket->getHostName();
  }
  else 
     return String::empty; 
}
```

[1] locking down the open port of an IC to accept localhost only for example, is not an unreasonable thing to want to do.

---

<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: [April 13, 2008, 2:42pm UTC](https://forum.juce.com/t/small-interprocessconnection-fr/2729/2 "2008-04-13T14:42:00Z")

</div>

Sounds pretty sensible, I can add that.

---

<div class="post-metadata">

### Author: ![valley](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@valley](https://forum.juce.com/u/valley)
#### Post date: [April 14, 2008, 3:12pm UTC](https://forum.juce.com/t/small-interprocessconnection-fr/2729/3 "2008-04-14T15:12:40Z")

</div>

Thanks Jules.
