| 32 |
Dictionary<Socket, VoiceClient> m_clients; |
Dictionary<Socket, VoiceClient> m_clients; |
| 33 |
Dictionary<UUID, VoiceClient> m_uuidToClient; |
Dictionary<UUID, VoiceClient> m_uuidToClient; |
| 34 |
|
|
| 35 |
|
bool m_enabled = true; |
| 36 |
|
|
| 37 |
public VoiceChatServer() |
public VoiceChatServer() |
| 38 |
{ |
{ |
| 314 |
m_log.Warn("[VOICECHAT]: Could not find realXtend configuration from OpenSim.ini"); |
m_log.Warn("[VOICECHAT]: Could not find realXtend configuration from OpenSim.ini"); |
| 315 |
m_voiceServerUrl = String.Empty; |
m_voiceServerUrl = String.Empty; |
| 316 |
} |
} |
| 317 |
|
|
| 318 |
|
if (String.IsNullOrEmpty(m_voiceServerUrl)) |
| 319 |
|
{ |
| 320 |
|
m_enabled = false; |
| 321 |
|
} |
| 322 |
} |
} |
| 323 |
|
|
| 324 |
public void PostInitialise() |
public void PostInitialise() |
| 325 |
{ |
{ |
| 326 |
|
if (m_enabled) |
| 327 |
|
{ |
| 328 |
m_clients = new Dictionary<Socket, VoiceClient>(); |
m_clients = new Dictionary<Socket, VoiceClient>(); |
| 329 |
m_uuidToClient = new Dictionary<UUID, VoiceClient>(); |
m_uuidToClient = new Dictionary<UUID, VoiceClient>(); |
| 330 |
|
|
| 358 |
m_selectCancel = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); |
m_selectCancel = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); |
| 359 |
m_selectCancel.Connect("localhost", m_dummySocketPort); |
m_selectCancel.Connect("localhost", m_dummySocketPort); |
| 360 |
} |
} |
| 361 |
|
} |
| 362 |
|
|
| 363 |
public void Close() |
public void Close() |
| 364 |
{ |
{ |
| 365 |
|
if (m_enabled) |
| 366 |
|
{ |
| 367 |
foreach (Scene s in m_scenes) |
foreach (Scene s in m_scenes) |
| 368 |
{ |
{ |
| 369 |
s.EventManager.OnNewClient -= NewClient; |
s.EventManager.OnNewClient -= NewClient; |
| 370 |
s.EventManager.OnRemovePresence -= RemovePresence; |
s.EventManager.OnRemovePresence -= RemovePresence; |
| 371 |
} |
} |
| 372 |
} |
} |
| 373 |
|
} |
| 374 |
|
|
| 375 |
public string Name |
public string Name |
| 376 |
{ |
{ |