<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi all,<BR>
&nbsp;<BR>
I rephrase my last question reagrding BW. I understand that ENet provide some sort of BW. I am wondering how or what should I check before I call <A class=el href="http://enet.bespin.org/group__host.html#g83c5fa02a3ba6ab829856302e54929fe"><U><FONT color=#800080>enet_host_bandwidth_limit</FONT></U></A>&nbsp;function. Would really appreciate a example?<BR>
&nbsp;<BR>
Thanks for your help?<BR>
&nbsp;<BR>
Regards,<BR>
Yao Kheng<BR>
&nbsp;<BR>
<BR><BR>&gt; Date: Tue, 3 Jun 2008 15:26:56 -0700<BR>&gt; From: lsalzman1@cox.net<BR>&gt; To: enet-discuss@cubik.org<BR>&gt; Subject: Re: [ENet-discuss] ENet-discuss Digest, Vol 61, Issue 1<BR>&gt; <BR>&gt; Note, you don't set the client's address to ENET_HOST_BROADCAST (pass in <BR>&gt; NULL for the client's address structure to enet_host_create as usual). <BR>&gt; You attempt to connect to ENET_HOST_BROADCAST, which will send out the <BR>&gt; connection request to the broadcast address, which will just broadcast <BR>&gt; anywhere on the LAN. If there's something on the other end of the LAN <BR>&gt; waiting to accept, it will get a connection from it. If there are <BR>&gt; multiple servers on the other end that pick up the broadcasted connect <BR>&gt; request, then whichever replies back first wins. There should be nothing <BR>&gt; different about it otherwise.<BR>&gt; <BR>&gt; You don't have to do anything special for LAN vs. internet for server <BR>&gt; addresses. Same stuff I described in previous email about IP applies.<BR>&gt; <BR>&gt; Lee<BR>&gt; <BR>&gt; Ben Johnson wrote:<BR>&gt; &gt; Wow, thanks for the fast reply.<BR>&gt; &gt; <BR>&gt; &gt; You cleared up quite a bit of my confusion, too.<BR>&gt; &gt; <BR>&gt; &gt; I ditched my vector of peer pointers, and am now using the host-&gt;peers <BR>&gt; &gt; instead.<BR>&gt; &gt; Also, instead of using a dummy connection when I want to play <BR>&gt; &gt; on non-dedicated server, I do something like this:<BR>&gt; &gt; <BR>&gt; &gt; maxPlayers = 12;<BR>&gt; &gt; if(!dedicated) maxPlayers--;<BR>&gt; &gt; host = enet_host_create(&amp;address, maxPlayers, 0, 0);<BR>&gt; &gt; serverPlayer = maxPlayers;<BR>&gt; &gt; <BR>&gt; &gt; this will only allow for 11 other players to join. And they will fill <BR>&gt; &gt; spots 0 to 10 in the host-&gt;peers array.<BR>&gt; &gt; The player the server now controls is player[serverPlayer] - which is <BR>&gt; &gt; the 12th and final player. So I don't have to worry about it being <BR>&gt; &gt; replaced, etc..<BR>&gt; &gt; <BR>&gt; &gt; Hooray, first 4 questions solved!<BR>&gt; &gt; <BR>&gt; &gt; As far as question 5 goes, I'm now using ENET_HOST_ANY. Regarding <BR>&gt; &gt; LAN.. what should I do then? Keep it as ENET_HOST_ANY? I read <BR>&gt; &gt; somewhere that the client should then set it's address to <BR>&gt; &gt; ENET_HOST_BROADCAST, and that will return any server addresses? I <BR>&gt; &gt; tried, but it didn't work.. Do I have to connect twice or something? <BR>&gt; &gt; Once to find the address, and then again to connect to it?<BR>&gt; &gt; <BR>&gt; &gt; Also, can a server host for both LAN and the internet at the same <BR>&gt; &gt; time? So anyone can join, whether they're in the LAN or on the net? If <BR>&gt; &gt; not, for testing purposes, is it possible for me to use my second <BR>&gt; &gt; computer which is on the LAN, but get it to join via the internet, so <BR>&gt; &gt; I can check to see if I've got both the LAN connection and the <BR>&gt; &gt; internet connections working properly. I've been reading a lot about <BR>&gt; &gt; NAT punch-through, so I imagine I might have to deal with that in the <BR>&gt; &gt; future, as I am using a router.. but hopefully I can get at least LAN <BR>&gt; &gt; working first.<BR>&gt; &gt; <BR>&gt; &gt; Thanks again!<BR>&gt; &gt; Ben.<BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; ENet-discuss mailing list<BR>&gt; ENet-discuss@cubik.org<BR>&gt; http://lists.cubik.org/mailman/listinfo/enet-discuss<BR><BR><br /><hr />Make the most of what you can do on your PC and the Web, just the way you want. <a href='http://www.get.live.com/wl/all' target='_new'>Windows Live</a></body>
</html>