<div dir="ltr">Well, what you describe seems to me that you connect peers from different ENetHost(s).<div><br></div><div>What I've tested is merely the same (pseudocode):</div><div><br></div><div>    ENetAddress address;</div>
<div>    a.host = <localhost></div><div>    a.port = <port></div><div><br></div><div>    EnetHost *host = enet_host_create(&address, .....);</div><div>    enet_host_connect(host, &address, ...);</div><div>
<br></div><div><div class="gmail_extra">Notice that the enet_host_connect() connects to the address which ENetHost was initialised with.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra">
Krasimir</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 7, 2013 at 12:00 PM, Ruud van Gaal <span dir="ltr"><<a href="mailto:ruud@racer.nl" target="_blank">ruud@racer.nl</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">All I can say that in principle this works; I use this every day (a single exe running both and a server and a client, where the client connects to its own server).<span><font color="#888888"><div>

Ruud</div></font></span></div><div class="gmail_extra">
<br><br><div class="gmail_quote"><div><div>On Wed, Nov 6, 2013 at 2:37 PM, Krasimir Marinov <span dir="ltr"><<a href="mailto:krasi@jklsemi.com" target="_blank">krasi@jklsemi.com</a>></span> wrote:<br></div>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>
<div dir="ltr"><div style="font-size:12px;font-family:Helvetica">Hi,</div><div style="font-size:12px;font-family:Helvetica"><br></div><div style="font-size:12px;font-family:Helvetica">
I’ve been trying to connect to the host:port that my ENetHost is bound to, i.e. connect and send to myself.</div><div style="font-size:12px;font-family:Helvetica">Unfortunately this almost immediately results in event DISCONNECT.</div>



<div style="font-size:12px;font-family:Helvetica"><br></div><div style="font-size:12px;font-family:Helvetica">Looking at the archives I found the same problem raised 9 years ago (see below).</div>
<div style="font-size:12px;font-family:Helvetica"><br></div><div style="font-size:12px;font-family:Helvetica">Any reason for this behaviour?</div><div style="font-size:12px;font-family:Helvetica">
<br></div><div style="font-size:12px;font-family:Helvetica">Regards,</div><div style="font-size:12px;font-family:Helvetica">Krasimir</div><div style="font-size:12px;font-family:Helvetica">
<br></div><h1 style="font-family:Times">[ENet-discuss] Connecting to self.</h1><b style="font-size:medium;font-family:Times">Adam D. Moss</b><span style="font-size:medium;font-family:Times"> </span><a href="mailto:enet-discuss%40cubik.org?Subject=%5BENet-discuss%5D%20Connecting%20to%20self.&In-Reply-To=" title="[ENet-discuss] Connecting to self." style="font-size:medium;font-family:Times" target="_blank">adam at gimp.org </a><br style="font-size:medium;font-family:Times">



<i style="font-size:medium;font-family:Times">Wed Dec 1 08:44:30 PST 2004</i><span style="font-size:medium;font-family:Times"></span><div style="font-size:medium;font-family:Times">
<br></div><ul style="font-size:medium;font-family:Times"><li>Next message: <a href="http://lists.cubik.org/pipermail/enet-discuss/2004-December/000312.html" target="_blank">[ENet-discuss] Connecting to self.</a></li>
<li><b>Messages sorted by:</b> <a href="http://lists.cubik.org/pipermail/enet-discuss/2004-December/date.html#311" target="_blank">[ date ]</a> <a href="http://lists.cubik.org/pipermail/enet-discuss/2004-December/thread.html#311" target="_blank">[ thread ]</a> <a href="http://lists.cubik.org/pipermail/enet-discuss/2004-December/subject.html#311" target="_blank">[ subject ]</a> <a href="http://lists.cubik.org/pipermail/enet-discuss/2004-December/author.html#311" target="_blank">[ author ]</a></li>



</ul><hr style="font-size:medium;font-family:Times"><pre style="font-size:12px">Hi!
I have a funny problem.  My app listens on a port and then attempts
to connect to itself (for testing purposes, for now).  But this
merely eventually causes a DISCONNECT (presumably time-out) event,
with no CONNECT.

However, if I launch a second process and do the connect from
there, the connection is fine.

Am I being stupid for attempting to have a process be a client
of its own server, or is there some unexpected strangeness which
prevents an ENet server from being its own client?

Thanks,
--Adam</pre></div>
<br></div></div><div>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></blockquote></div><br></div></div></div>