title: Akka create two Tcp Connections with the same port
body: <p>I'm trying to create two tcp connections that are bound to the same port. I'm getting an error saying that the <code>java.net.BindException: Address already in use</code>. This makes sense since they are both using <code>18333</code> as a port, but there must be some way to have two connections on a port that have unique hosts. I'm following along with the <a href="http://doc.akka.io/docs/akka/2.3.15/scala/io-tcp.html#Connecting" rel="nofollow">guide in the akka tcp manual</a>. How can I make this work? The protocol says that connections need to be created on <code>18333</code>, however if I can only have one peer at a time it makes the p2p portion of the protocol useless. </p>
  
  <p>Here is the code: </p>
  
  <pre><code>val probe1 = TestProbe()
  val probe2 = TestProbe()
  val client1 = system.actorOf(Client.props(TestNet3, probe1.ref))
  val client2 = system.actorOf(Client.props(TestNet3, probe2.ref))
  
  val local = new InetSocketAddress(18333)
  
  val remote1 = new InetSocketAddress("testnet-seed.bitcoin.petertodd.org", 18333)
  
  client1 ! Tcp.Connect(remote1,Some(local))
  probe1.expectMsgType[Tcp.Connected]
  
  val remote2 = new InetSocketAddress("testnet-seed.bluematt.me", 18333)
  client2 ! Tcp.Connect(remote2,Some(local))
  probe2.expectMsgType[Tcp.Connected]
  
  
  client1 ! Tcp.Abort
  client2 ! Tcp.Abort
  </code></pre>