heres my code
try
{
bool Flag = false;
foreach (Client client in Clients.ToList())
{
if (client.roomName == connection.mRoomName)
{
Flag = true;
break;
}
}
if (!Flag)
{
Client client = new Client(connection.mRoomName);
Thread thd = new Thread(() => { client.mNetConnection.Connect(connection.mRoomRTMP, param); });
client.SetHandler(thd);
thd.Start();
Clients.Add(client);
}
}
------
------

paul aarman17 reputationPosted May 25, 2013, 12:19 PM EDT
VulpesRank #55 · 29.2K reputationPosted May 25, 2013, 1:51 PM EDT
You'll therefore need to move its declaration outside the try/catch for it to be accessible in both blocks.
paul aarman17 reputationPosted May 25, 2013, 3:04 PM EDT
where i need to put it in
VulpesRank #55 · 29.2K reputationPosted May 25, 2013, 3:37 PM EDT
paul aarman17 reputationPosted May 25, 2013, 4:58 PM EDT
client.mNetConnection.Connect(connection.mRoomRTMP, param);
when it cant connect
paul aarman17 reputationPosted May 25, 2013, 5:03 PM EDT
totaly works
vulpes im impress at how good you are at making code work without knowing the whole context of the codes