private void SocketOpened(object sender, System.EventArgs e) { //invoke when socket opened Debug.Log("socket opened"); m_connected = true; List <String> .Enumerator i = m_sendQueue.GetEnumerator(); while (i.MoveNext()) { m_socket.Send(i.Current); } m_sendQueue.Clear(); // Inform the relayserver we're a server SendCmd("server", -1, m_options); OnConnect.Emit(this, new EventArgs()); }