<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">gamespy transport service is using udp.
<br>
right now one of the player creates socket and just listens to it,
another on is actively trying to connect to other party, but fails
at create_host for some reasons. I am creating host in the same
way on both machines.<br>
<br>
I am testing connectivity on the same machines constantly, so I
dont see any reason why it should work for 3 times in a row and
then wouldnt... and it's a bit weird moment - creating host, i
would expect it to fail when actually trying to connect<br>
:(<br>
<br>
<br>
On 18/09/2012 16:16, Daniel Aquino wrote:<br>
</div>
<blockquote
cite="mid:CACRDGdmbJ4YV876rPnsnWEq6kRsO2ahk0NfbMVr4qBx8YwSFOQ@mail.gmail.com"
type="cite">Is gamespy using tcp or udp ?<br>
<br>
If both your players try to connect at the same time then they
should get through after a retry or two.<br>
<br>
Although there is many types of nat's so it might not always work.<br>
<br>
<br>
<br>
<div class="gmail_quote">On Tue, Sep 18, 2012 at 10:37 AM, Martin
Zemblowski <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:martin@bigheadgames.co.uk" target="_blank">martin@bigheadgames.co.uk</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb">
<div class="h5">
<div bgcolor="#FFFFFF" text="#000000">
<div style="font-family:-moz-fixed;font-size:14px"
lang="x-western">Hello! <br>
I am using enet library in conjunction with gamespy. I
use gamespy to create socket, connect to lobby, select
opponent and do the NAT punch-through. In next step I
close gamespy socket, initialize enet library and try
to create enet host with same port (in my case I pass
ip as empty string) and then start connection to other
party. It works, but not always. I am using three
computers right now: pc vista, pc xp and mac osx
10.7.4. On mac sometimes (not always) I cannot create
enet host (even if i try to create host with different
ports, 100 retries), here's the code: <br>
<br>
retries = 101; <br>
enet_address_set_host (&enet.gAddress, ip); <br>
do { <br>
enet.gAddress.port = port; <br>
enet.gHost = enet_host_create (&enet.gAddress
, 1 , 2, 0 ,0 ); <br>
<br>
if (enet.gHost == NULL) <br>
{ <br>
printf ( "An error occurred while trying to
create an ENet host(%s:%d).\n",ip,port); <br>
port++; // HACK <br>
} <br>
else <br>
printf( "host created.\n"); <br>
} while (enet.gHost == NULL && (--retries
> 0)); <br>
<br>
Any ideas? <br>
Thank you! <br>
Martin <br>
<br>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
ENet-discuss mailing list<br>
<a moz-do-not-send="true" href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
<a moz-do-not-send="true"
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
ENet-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a>
<a class="moz-txt-link-freetext" href="http://lists.cubik.org/mailman/listinfo/enet-discuss">http://lists.cubik.org/mailman/listinfo/enet-discuss</a>
</pre>
</blockquote>
<br>
</body>
</html>