Michael von Aichberger <[EMAIL PROTECTED]> wrote:
> I now loop through the PeerConnectionList to address all clients.

Hi Michael,

There is no need to loop through the list.  You can set the list itself to
be the recipient, and the server will automatically loop through it and send
the message to each recipient in the list.

>I tried ... writing the connectToNetServer command right
> after the waitForNetConnection command. Like that:
> 
>   errCode = pConn.waitForNetConnection("server user",1627)
>   if errCode <> 0 then
>     alert("Error while executing pConn.waitForNetConnection('server
> user',1627)")
>   end if
>   errCode = pConn.connectToNetServer(pUserID,"", gPL.serverIP, 1627, "sync")
>   if errCode <> 0 then
>     alert( "Error while executing pConn.connectToNetServer(pUserID,'',
> gPL.serverIP,'sync')"  )
>   end if
> 
> 
> This doesn't seem to work.

The Multiuser xtra instance operates (1) asynchronously and (2) on idle.
This means that commands sent to the instance not executed until after the
handler is finished.

Your first call to waitForNetConnection() has therefore not been executed by
the time you make your second call to connectToNetServer(): the xtra
instance needs a breathing space between the two.

I am sending you a movie, offlist, which allows you to see that calls
separated by idle time do result in a PeerConnectionList with the name of
the Host movie's user.

The other point to remember is that the Host movie must return TRUE to the
multiuser instance when a peer movie makes a connectToNetServer() call.  If
TRUE is not returned, the connection will be rejected.

Cheers,

James

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to